Fix in mtemplate conflict
This commit is contained in:
commit
4b919b16f4
5 changed files with 103 additions and 8 deletions
|
|
@ -105,6 +105,35 @@ class I18n:
|
|||
|
||||
l={}
|
||||
|
||||
def __init__(self, module):
|
||||
|
||||
self.module=module
|
||||
|
||||
def slang(self, symbol, text_default, lang=None):
|
||||
"""Method for get a string from selected language but object oriented
|
||||
|
||||
Method for get a string from selected language but object oriented
|
||||
|
||||
Args:
|
||||
symbol (str): The symbol used for identify the text string.
|
||||
text_default (str): The text default used. You have use how base for translations.
|
||||
"""
|
||||
return I18n.lang(self.module, symbol, text_default, lang)
|
||||
|
||||
def tlang(self, text_default, lang=None):
|
||||
"""Method for get a string from selected language but object oriented and using module and symbol by default
|
||||
|
||||
Method for get a string from selected language but object oriented and using module and symbol by default
|
||||
|
||||
Args:
|
||||
symbol (str): The symbol used for identify the text string.
|
||||
text_default (str): The text default used. You have use how base for translations.
|
||||
"""
|
||||
|
||||
symbol=text_default[:60]
|
||||
|
||||
return I18n.lang(self.module, symbol, text_default, lang)
|
||||
|
||||
#@staticmethod
|
||||
#def set_lang(code_lang):
|
||||
# if default_lang
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue