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/h/o/hortonworks-sandbox-HEAD/desktop/core/ext-py/Babel-0.9.6/babel/messages/frontend.py   hortonworks-sandbox(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/o/socorro-HEAD/webapp-django/vendor/lib/python/babel/messages/frontend.py   socorro(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/a/d/adhocracy-2.4.1/src/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/src/adhocracy/model/instance.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/installed_eggs/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/installed_eggs/adhocracy/model/instance.py   adhocracy(Download)
    def _get_locale(self):
        if not self._locale:
            return None
        return Locale.parse(self._locale)
 

src/p/l/Plurk_Solace-0.1/solace/models.py   Plurk_Solace(Download)
    def __init__(self, locale, title, text, user, date=None):
        self.locale = Locale.parse(locale)
        self.title = title
        # start with -1, when the question post is created the code will
        # increment it to zero automatically.
    def __init__(self, user, locale):
        self.user = user
        self.locale = Locale.parse(locale)
        self.counter = 0
        self.first_activity = self.last_activity = datetime.utcnow()
    def __init__(self, name, locale):
        self.name = name
        self.locale = Locale.parse(locale)
        self.tagged = 0
        session.add(self)

src/m/e/me-HEAD/libs/babel/messages/frontend.py   me(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/k/i/kitsune-HEAD/vendor/packages/Babel/babel/messages/frontend.py   kitsune(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/g/l/glow-HEAD/vendor/lib/python/babel/messages/frontend.py   glow(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)

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