Commit 874e32cf authored by Jérome Perrin's avatar Jérome Perrin

supports the way i18n is imported in Localizer 1.2.3+


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30305 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7c9f9e2d
...@@ -19,6 +19,7 @@ try: ...@@ -19,6 +19,7 @@ try:
except ImportError: except ImportError:
from Products.ERP5Type.patches.string import Template from Products.ERP5Type.patches.string import Template
from itools import i18n
from Products.ERP5Type.Message import Message from Products.ERP5Type.Message import Message
from zLOG import LOG, ERROR from zLOG import LOG, ERROR
...@@ -150,7 +151,7 @@ def get_language_name(self, id=None): ...@@ -150,7 +151,7 @@ def get_language_name(self, id=None):
""" """
if id is None: if id is None:
id = self.get_default_language() id = self.get_default_language()
language_name = LanguageManager.i18n.get_language_name(id) language_name = i18n.get_language_name(id)
if language_name=='???': if language_name=='???':
return self.get_user_defined_language_name(id) or language_name return self.get_user_defined_language_name(id) or language_name
else: else:
...@@ -169,7 +170,7 @@ def get_all_languages(self): ...@@ -169,7 +170,7 @@ def get_all_languages(self):
""" """
Returns all ISO languages, used by 'manage_languages'. Returns all ISO languages, used by 'manage_languages'.
""" """
return LanguageManager.i18n.get_languages() + self.get_user_defined_languages() return i18n.get_languages() + self.get_user_defined_languages()
# New method # New method
def get_user_defined_languages(self): def get_user_defined_languages(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment