コード例 #1
0
ファイル: test_i18n.py プロジェクト: javamo/gae-boilerplate
 def testDisableI18n(self):
     config.locales = []
     locale = i18n.set_locale(None)
     self.assertEqual(locale, None)
     config.locales = None
     locale = i18n.set_locale(None)
     self.assertEqual(locale, None)
コード例 #2
0
ファイル: tests.py プロジェクト: 10-01/alc-server
 def test_disable_i18n(self):
     self.app.config['locales'] = []
     locale = i18n.set_locale(self)
     self.assertEqual(locale, None)
     self.app.config['locales'] = None 
     locale = i18n.set_locale(self)
     self.assertEqual(locale, None)
コード例 #3
0
 def testDisableI18n(self):
     config.locales = []
     locale = i18n.set_locale(None)
     self.assertEqual(locale, None)
     config.locales = None
     locale = i18n.set_locale(None)
     self.assertEqual(locale, None)
コード例 #4
0
 def __init__(self, request, response):
     """ Override the initialiser in order to set the language.
     """
     self.initialize(request, response)
     self.locale = i18n.set_locale(self)
     self.language = i18n.get_language(self.locale)
     self.territory_code = i18n.get_territory_code(self.locale)
コード例 #5
0
 def __init__(self, request, response):
     """ Override the initialiser in order to set the language.
     """
     self.initialize(request, response)
     self.locale = i18n.set_locale(self)
     self.view = ViewClass()
コード例 #6
0
 def __init__(self, request, response):
     """ Override the initialiser in order to set the language.
     """
     self.initialize(request, response)
     self.locale = i18n.set_locale(self)
     self.view = ViewClass()