def getLang():
 if getattr(threadLocal, 'currentLang', None):
  return threadLocal.currentLang
 else:
  return currentLang

def getLang ( ) : if getattr ( threadLocal , 'currentLang' , None ) : return threadLocal . currentLang else : return currentLang
return the language local to this thread .