Fixes in i18n

This commit is contained in:
Antonio de la Rosa 2015-12-11 03:31:53 +01:00
parent b80b78f66e
commit 2abf62a107
3 changed files with 10 additions and 5 deletions

View file

@ -7,7 +7,7 @@ pattern=re.compile('^\w+\.py$')
ignored=re.compile('^[__|\.].*$')
lang_p=re.compile()
lang_p=re.compile("I18n.lang\('(.*)',\s+'(.*)',\s+'(.*)'\)")
def start():

View file

@ -6,21 +6,25 @@ def load_lang(*args):
for module in args:
lang_path=module+'.i18n'
lang_path=module+'.i18n.'+I18n.default_lang+'.'+module.split('.')[-1]
try:
i18n_module=import_module(module)
return True
pass
except:
return False
pass
# here load the language
class I18n:
default_lang='en-US'
dict_i18n=['en-US', 'es-ES']
l={}
@staticmethod