Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(258) | Call(258) | Derive(0) | Import(0)
Create a `Locale` instance for the given locale identifier. >>> l = Locale.parse('de-DE', sep='-') >>> l.display_name u'Deutsch (Deutschland)' If the `identifier` parameter is not a string, but actually a `Locale` object, that object is returned: >>> Locale.parse(l)(more...)
src/k/u/kuma-lib-HEAD/packages/Babel/babel/messages/frontend.py kuma-lib(Download)
'new catalog') try: self._locale = Locale.parse(self.locale) except UnknownLocaleError, e: raise DistutilsOptionError(e)
format = u'%%-%ds %%s' % (longest + 1) for identifier in localedata.list(): locale = Locale.parse(identifier) output = format % (identifier, locale.english_name) print output.encode(sys.stdout.encoding or
parser.error('you must provide a locale for the new catalog') try: locale = Locale.parse(options.locale) except UnknownLocaleError, e: parser.error(e)
src/i/n/input-lib-HEAD/packages/Babel/babel/messages/frontend.py input-lib(Download)
'new catalog') try: self._locale = Locale.parse(self.locale) except UnknownLocaleError, e: raise DistutilsOptionError(e)
format = u'%%-%ds %%s' % (longest + 1) for identifier in localedata.list(): locale = Locale.parse(identifier) output = format % (identifier, locale.english_name) print output.encode(sys.stdout.encoding or
parser.error('you must provide a locale for the new catalog') try: locale = Locale.parse(options.locale) except UnknownLocaleError, e: parser.error(e)
src/p/l/plexnet-HEAD/third_party/python/babel/messages/frontend.py plexnet(Download)
'new catalog') try: self._locale = Locale.parse(self.locale) except UnknownLocaleError, e: raise DistutilsOptionError(e)
format = u'%%-%ds %%s' % (longest + 1) for identifier in sorted(localedata.list()): locale = Locale.parse(identifier) output = format % (identifier, locale.english_name) print output.encode(sys.stdout.encoding or
parser.error('you must provide a locale for the new catalog') try: locale = Locale.parse(options.locale) except UnknownLocaleError, e: parser.error(e)
src/b/a/Babel-1.3/babel/messages/frontend.py Babel(Download)
'new catalog') try: self._locale = Locale.parse(self.locale) except UnknownLocaleError as e: raise DistutilsOptionError(e)
format = u'%%-%ds %%s' % (longest + 1) for identifier in identifiers: locale = Locale.parse(identifier) output = format % (identifier, locale.english_name) print(output.encode(sys.stdout.encoding or
parser.error('you must provide a locale for the new catalog') try: locale = Locale.parse(options.locale) except UnknownLocaleError as e: parser.error(e)
src/g/a/gae-boilerplate-HEAD/bp_includes/lib/basehandler.py gae-boilerplate(Download)
locales = {} for l in self.app.config.get('locales'): current_locale = Locale.parse(self.locale) language = current_locale.languages[l.split('_')[0]] territory = current_locale.territories[l.split('_')[1]]
if self.locale and len(locales) > 1: locale_iso = Locale.parse(self.locale) language_id = locale_iso.language territory_id = locale_iso.territory
src/p/l/Plurk_Solace-0.1/solace/views/users.py Plurk_Solace(Download)
if len(settings.LANGUAGE_SECTIONS) == 1: return redirect(url_for('users.userlist')) locale = Locale.parse(locale) query = query.active_in(locale) query = query.order_by(User.reputation.desc())
src/p/l/Plurk_Solace-0.1/solace/views/core.py Plurk_Solace(Download)
def set_language(request, locale): """Sets the new locale.""" try: locale = Locale.parse(locale) if not has_section(locale):
src/p/l/Plurk_Solace-0.1/solace/utils/api.py Plurk_Solace(Download)
if locale is not None: try: locale = Locale.parse(locale) if not has_locale(locale): raise UnknownLocaleError()
src/b/o/bomfu-HEAD/boilerplate/lib/basehandler.py bomfu(Download)
locales = {} for l in self.app.config.get('locales'): current_locale = Locale.parse(self.locale) language = current_locale.languages[l.split('_')[0]] territory = current_locale.territories[l.split('_')[1]]
if self.locale and len(locales) > 1: locale_iso = Locale.parse(self.locale) language_id = locale_iso.language territory_id = locale_iso.territory
src/l/i/livepythonconsole-app-engine-HEAD/boilerplate/lib/basehandler.py livepythonconsole-app-engine(Download)
locales = {} for l in self.app.config.get('locales'): current_locale = Locale.parse(self.locale) language = current_locale.languages[l.split('_')[0]] territory = current_locale.territories[l.split('_')[1]]
if self.locale and len(locales) > 1: locale_iso = Locale.parse(self.locale) language_id = locale_iso.language territory_id = locale_iso.territory
Previous 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 Next