Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(288)  |  Call(120)  |  Derive(2)  |  Import(166)
Representation of a specific locale.

>>> locale = Locale('en', 'US')
>>> repr(locale)
'<Locale "en_US">'
>>> locale.display_name
u'English (United States)'

A `Locale` object can also be instantiated from a raw locale string:
(more...)

src/m/u/Muntjac-1.1.2/muntjac/demo/sampler/ExampleUtil.py   Muntjac(Download)
from muntjac.terminal.theme_resource import ThemeResource
 
from babel import Locale
 
 
            idd = cls._locales[i][2]
            item = localeContainer.addItem(idd)
            v = Locale(cls._locales[i][0], cls._locales[i][1])
            item.getItemProperty(cls.locale_PROPERTY_LOCALE).setValue(v)
            v = cls._locales[i][2]

src/m/u/muntjac-HEAD/muntjac/demo/sampler/ExampleUtil.py   muntjac(Download)
from muntjac.terminal.theme_resource import ThemeResource
 
from babel import Locale
 
 
            idd = cls._locales[i][2]
            item = localeContainer.addItem(idd)
            v = Locale(cls._locales[i][0], cls._locales[i][1])
            item.getItemProperty(cls.locale_PROPERTY_LOCALE).setValue(v)
            v = cls._locales[i][2]

src/a/d/adhocracy-2.4.1/parts/omelette/adhocracy/i18n/__init__.py   adhocracy(Download)
import pytz
import babel
from babel import Locale
import babel.dates
import formencode
 
 
LOCALES = [babel.Locale('de', 'DE'),
           babel.Locale('en', 'US'),
           babel.Locale('fr', 'FR'),
           babel.Locale('it', 'IT'),

src/a/d/adhocracy-2.4.1/src/adhocracy/i18n/__init__.py   adhocracy(Download)
import pytz
import babel
from babel import Locale
import babel.dates
import formencode
 
 
LOCALES = [babel.Locale('de', 'DE'),
           babel.Locale('en', 'US'),
           babel.Locale('fr', 'FR'),
           babel.Locale('it', 'IT'),

src/a/d/adhocracy-2.4.1/installed_eggs/adhocracy/i18n/__init__.py   adhocracy(Download)
import pytz
import babel
from babel import Locale
import babel.dates
import formencode
 
 
LOCALES = [babel.Locale('de', 'DE'),
           babel.Locale('en', 'US'),
           babel.Locale('fr', 'FR'),
           babel.Locale('it', 'IT'),

src/a/d/adhocracy-2.4.1/src/adhocracy/publixphere_theme/i18n/__init__.py   adhocracy(Download)
import pytz
import babel
from babel import Locale
import babel.dates
import formencode
 
 
LOCALES = [babel.Locale('de', 'DE'),
           babel.Locale('en', 'US'),
           babel.Locale('fr', 'FR'),
           babel.Locale('it', 'IT'),

src/a/d/adhocracy-HEAD/src/adhocracy/i18n/__init__.py   adhocracy(Download)
import pytz
import babel
from babel import Locale
from babel.core import LOCALE_ALIASES
import babel.dates
 
 
LOCALES = [babel.Locale('de', 'DE'),
           babel.Locale('en', 'US'),
           babel.Locale('fr', 'FR'),
           babel.Locale('it', 'IT'),

src/m/u/Muntjac-1.1.2/muntjac/terminal/gwt/server/abstract_communication_manager.py   Muntjac(Download)
    from StringIO import StringIO
 
from babel import Locale
 
from muntjac.util import clsname
        temp = value.split('_')
        if len(temp) == 1:
            return Locale(temp[0], '')
        elif len(temp) == 2:
            return Locale(temp[0], temp[1])
        else:
            return Locale(temp[0], temp[1])#, temp[2])

src/m/u/muntjac-HEAD/muntjac/terminal/gwt/server/abstract_communication_manager.py   muntjac(Download)
    from StringIO import StringIO
 
from babel import Locale
 
from muntjac.util import clsname
        temp = value.split('_')
        if len(temp) == 1:
            return Locale(temp[0], '')
        elif len(temp) == 2:
            return Locale(temp[0], temp[1])
        else:
            return Locale(temp[0], temp[1])#, temp[2])

src/r/e/reporter-HEAD/apps/input/helpers.py   reporter(Download)
from django.utils.safestring import mark_safe
 
from babel import Locale, UnknownLocaleError
from babel.support import Format
from jingo import register
def _get_format():
    lang = translation.get_language()
    try:
        locale = Locale(translation.to_locale(lang))
    except UnknownLocaleError:
        locale = Locale(translation.to_locale(settings.BABEL_FALLBACK.get(

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