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/m/i/microblog-HEAD/flask/lib/python2.7/site-packages/babel/messages/frontend.py   microblog(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/f/l/Flask-BabelEx-0.9.1/flask_babelex/__init__.py   Flask-BabelEx(Download)
from flask_babelex._compat import string_types
 
_DEFAULT_LOCALE = Locale.parse('en')
 
 
                continue
            if filter(lambda x: x.endswith('.mo'), os.listdir(locale_dir)):
                result.append(Locale.parse(folder))
        if not result:
            result.append(Locale.parse(self._default_locale))
        rv = self._locale_cache.get(locale)
        if rv is None:
            self._locale_cache[locale] = rv = Locale.parse(locale)
        return rv
 

src/g/a/gae-boilerplate-HEAD/bp_includes/external/babel/messages/frontend.py   gae-boilerplate(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 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, e:
            parser.error(e)

src/a/d/adhocracy-2.4.1/parts/omelette/adhocracy/model/user.py   adhocracy(Download)
    def _get_locale(self):
        if not self._locale:
            return None
        return Locale.parse(self._locale)
 

src/a/d/adhocracy-2.4.1/parts/omelette/adhocracy/model/instance.py   adhocracy(Download)
    def _get_locale(self):
        if not self._locale:
            return None
        return Locale.parse(self._locale)
 

src/h/u/hue-HEAD/desktop/core/ext-py/Babel-0.9.6/babel/messages/frontend.py   hue(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 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, e:
            parser.error(e)

src/s/t/stackgeek-gaeb-HEAD/lib/externals/babel/messages/frontend.py   stackgeek-gaeb(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 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, e:
            parser.error(e)

src/b/o/bomfu-HEAD/boilerplate/external/babel/messages/frontend.py   bomfu(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 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, e:
            parser.error(e)

src/l/i/livepythonconsole-app-engine-HEAD/boilerplate/external/babel/messages/frontend.py   livepythonconsole-app-engine(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 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, e:
            parser.error(e)

src/f/j/fjord-HEAD/vendor/packages/Babel/babel/messages/frontend.py   fjord(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)

Previous  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next