twblue/src/mysc/localization.py

13 lines
255 B
Python
Raw Normal View History

2015-01-08 08:01:45 -06:00
import os
import languageHandler
def get(rootFolder):
2015-01-08 08:01:45 -06:00
defaultLocale = languageHandler.curLang
if len(defaultLocale) > 2:
defaultLocale = defaultLocale[:2]
if os.path.exists(rootFolder+"/"+defaultLocale):
return defaultLocale
else:
return "en"