Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(493) | Call(493) | 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/m/u/Muntjac-1.1.2/muntjac/terminal/gwt/server/paste_wsgi_servlet.py Muntjac(Download)
if tags: try: return Locale.parse(tags[0], sep='-') except UnknownLocaleError, e: try: return Locale.parse(tags[0])
src/m/u/muntjac-HEAD/muntjac/terminal/gwt/server/paste_wsgi_servlet.py muntjac(Download)
if tags: try: return Locale.parse(tags[0], sep='-') except UnknownLocaleError, e: try: return Locale.parse(tags[0])
src/r/e/reddit-HEAD/r2/r2/controllers/reddit_base.py reddit(Download)
try: c.locale = babel.core.Locale.parse(lang, sep='-') except (babel.core.UnknownLocaleError, ValueError): c.locale = babel.core.Locale.parse(g.lang, sep='-')
src/r/e/reddit-HEAD/r2/r2/lib/pages/trafficpages.py reddit(Download)
try: lang_locale = babel.core.Locale.parse(language_code, sep="-") except (babel.core.UnknownLocaleError, ValueError): return language_code
src/a/f/affiliates-HEAD/affiliates/base/utils.py affiliates(Download)
""" try: return Locale.parse(get_language(), sep='-') except (UnknownLocaleError, ValueError): # Default to en-US
src/f/i/firefox-flicks-HEAD/flicks/base/helpers.py firefox-flicks(Download)
def _babel_locale(): """Return the current locale in Babel's format.""" try: return Locale.parse(get_language(), sep='-') except UnknownLocaleError:
src/i/n/internationalization-1.0/internationalization/core/impl/po_file_manager.py internationalization(Download)
def getGlobalPOTimestamp(self, locale): ''' @see: IPOFileManager.getGlobalPOTimestamp ''' try: locale = Locale.parse(locale)
''' assert isinstance(component, str), 'Invalid component id %s' % component try: locale = Locale.parse(locale) except UnknownLocaleError: raise InvalidLocaleError(locale) return self._lastModified(locale, component=component)
''' assert isinstance(plugin, str), 'Invalid plugin id %s' % plugin try: locale = Locale.parse(locale) except UnknownLocaleError: raise InvalidLocaleError(locale) return self._lastModified(locale, plugin=plugin)
def getGlobalPOFile(self, locale): ''' @see: IPOFileManager.getGlobalPOFile ''' try: locale = Locale.parse(locale)
def getGlobalAsDict(self, locale): ''' @see: IPOFileManager.getGlobalAsDict ''' try: locale = Locale.parse(locale)
src/a/l/ally-py-0.9.0/internationalization/core/impl/po_file_manager.py ally-py(Download)
def getGlobalPOTimestamp(self, locale): ''' @see: IPOFileManager.getGlobalPOTimestamp ''' try: locale = Locale.parse(locale)
''' assert isinstance(component, str), 'Invalid component id %s' % component try: locale = Locale.parse(locale) except UnknownLocaleError: raise InvalidLocaleError(locale) return self._lastModified(locale, component=component)
''' assert isinstance(plugin, str), 'Invalid plugin id %s' % plugin try: locale = Locale.parse(locale) except UnknownLocaleError: raise InvalidLocaleError(locale) return self._lastModified(locale, plugin=plugin)
def getGlobalPOFile(self, locale): ''' @see: IPOFileManager.getGlobalPOFile ''' try: locale = Locale.parse(locale)
def getGlobalAsDict(self, locale): ''' @see: IPOFileManager.getGlobalAsDict ''' try: locale = Locale.parse(locale)
src/f/j/fjord-HEAD/vendor/packages/Babel/babel/dates.py fjord(Download)
if datetime.tzinfo is None: datetime = datetime.replace(tzinfo=UTC) locale = Locale.parse(locale) offset = datetime.tzinfo.utcoffset(datetime)
dt = None tzinfo = dt_or_tzinfo locale = Locale.parse(locale) if hasattr(tzinfo, 'zone'):
dt = None tzinfo = dt_or_tzinfo locale = Locale.parse(locale) if hasattr(tzinfo, 'zone'):
date = date.date() locale = Locale.parse(locale) if format in ('full', 'long', 'medium', 'short'): format = get_date_format(format, locale=locale)
datetime = tzinfo.normalize(datetime) locale = Locale.parse(locale) if format in ('full', 'long', 'medium', 'short'): return get_datetime_format(format, locale=locale) \
src/z/e/ZenPacks.zenoss.OpenStack-HEAD/src/Babel-1.3/babel/dates.py ZenPacks.zenoss.OpenStack(Download)
if datetime.tzinfo is None: datetime = datetime.replace(tzinfo=UTC) locale = Locale.parse(locale) offset = datetime.tzinfo.utcoffset(datetime)
dt = None tzinfo = dt_or_tzinfo locale = Locale.parse(locale) if hasattr(tzinfo, 'zone'):
dt = None tzinfo = dt_or_tzinfo locale = Locale.parse(locale) if hasattr(tzinfo, 'zone'):
date = date.date() locale = Locale.parse(locale) if format in ('full', 'long', 'medium', 'short'): format = get_date_format(format, locale=locale)
datetime = tzinfo.normalize(datetime) locale = Locale.parse(locale) if format in ('full', 'long', 'medium', 'short'): return get_datetime_format(format, locale=locale) \
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next