Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(86) | Call(86) | Derive(0) | Import(0)
Load translations from the given directory. :param dirname: the directory containing the ``MO`` files :param locales: the list of locales in order of preference (items in this list can be either `Locale` objects or locale strings) :param domain: the message domain :return: the loaded catalog, or a ``NullTranslations`` instance if no matching translations were found :rtype: `Translations`
src/w/e/webapp2_example-HEAD/lib/webapp2_extras/i18n.py webapp2_example(Download)
trans_null = None for domain in domains: _trans = support.Translations.load(dirname, locales, domain) if isinstance(_trans, NullTranslations): trans_null = _trans
src/r/e/reahl-component-2.1.0/reahl/component/i18n.py reahl-component(Download)
for locale_dir in package.__path__: if not isinstance(translation, Translations): translation = Translations.load(dirname=locale_dir, locales=[locale], domain=domain) else: translation.merge(Translations.load(dirname=locale_dir, locales=[locale], domain=domain))
src/m/i/microblog-HEAD/flask/lib/python2.7/site-packages/flask_wtf/i18n.py microblog(Download)
dirname = messages_path() translations = support.Translations.load( dirname, [get_locale()], domain='wtforms' ) ctx.wtforms_translations = translations
src/d/e/decanter-0.1.9.1/decanter/lib/i18n.py decanter(Download)
translations = request.environ.get('babel_translations', None) if translations is None: translations = support.Translations.load(locale_dir, [get_locale()], domain=domain) request.environ['babel_translations'] = translations return translations
src/j/u/june-HEAD/june/forms/_base.py june(Download)
dirname = messages_path() translations = support.Translations.load( dirname, [get_locale()], domain='wtforms' ) ctx.wtforms_translations = translations
src/d/e/decanter-HEAD/decanter/lib/i18n.py decanter(Download)
translations = request.environ.get('babel_translations', None) if translations is None: translations = support.Translations.load(locale_dir, [get_locale()], domain=domain) request.environ['babel_translations'] = translations return translations
src/f/l/Flask-WTF-0.9.5/flask_wtf/i18n.py Flask-WTF(Download)
dirname = messages_path() translations = support.Translations.load( dirname, [get_locale()], domain='wtforms' ) ctx.wtforms_translations = translations
src/f/l/Flask-BabelEx-0.9.1/flask_babelex/__init__.py Flask-BabelEx(Download)
if translations is None: dirname = self.get_translations_path(ctx) translations = support.Translations.load(dirname, locale, domain=self.domain)
src/f/l/flask-wtf-HEAD/flask_wtf/i18n.py flask-wtf(Download)
dirname = messages_path() translations = support.Translations.load( dirname, [get_locale()], domain='wtforms' ) ctx.wtforms_translations = translations
src/g/a/gae-init-babel-HEAD/main/i18n.py gae-init-babel(Download)
translations_path = os.path.join(root, 'translations') translations = support.Translations.load( translations_path, [babel.get_locale()], domain='messages' ) ctx.wtforms_translations = translations
1 | 2 | 3 | 4 | 5 | 6 | 7 Next