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

All Samples(10)  |  Call(10)  |  Derive(0)  |  Import(0)
Return the system default locale for the specified category.

>>> for name in ['LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LC_MESSAGES']:
...     os.environ[name] = ''
>>> os.environ['LANG'] = 'fr_FR.UTF-8'
>>> Locale.default('LC_MESSAGES')
Locale('fr', territory='FR')

The following fallbacks to the variable are always considered:
(more...)

src/m/u/Muntjac-1.1.2/muntjac/util.py   Muntjac(Download)
    else:
        try:
            return Locale.default()
        except UnknownLocaleError:
            return Locale('en', 'US')

src/m/u/muntjac-HEAD/muntjac/util.py   muntjac(Download)
    else:
        try:
            return Locale.default()
        except UnknownLocaleError:
            return Locale('en', 'US')

src/t/r/trac-HEAD/trac/admin/api.py   trac(Download)
                  if env else None
        try:
            return get_negotiated_locale([lang, default]) or Locale.default()
        except UnknownLocaleError:
            pass

src/f/j/fjord-HEAD/vendor/packages/Babel/tests/test_core.py   fjord(Download)
def test_can_return_default_locale(os_environ):
    os_environ['LC_MESSAGES'] = 'fr_FR.UTF-8'
    assert Locale('fr', 'FR') == Locale.default('LC_MESSAGES')
 
 
    def test_default(self, os_environ):
        for name in ['LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LC_MESSAGES']:
            os_environ[name] = ''
        os_environ['LANG'] = 'fr_FR.UTF-8'
        default = Locale.default('LC_MESSAGES')

src/z/e/ZenPacks.zenoss.OpenStack-HEAD/src/Babel-1.3/tests/test_core.py   ZenPacks.zenoss.OpenStack(Download)
def test_can_return_default_locale(os_environ):
    os_environ['LC_MESSAGES'] = 'fr_FR.UTF-8'
    assert Locale('fr', 'FR') == Locale.default('LC_MESSAGES')
 
 
    def test_default(self, os_environ):
        for name in ['LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LC_MESSAGES']:
            os_environ[name] = ''
        os_environ['LANG'] = 'fr_FR.UTF-8'
        default = Locale.default('LC_MESSAGES')

src/b/a/Babel-1.3/tests/test_core.py   Babel(Download)
def test_can_return_default_locale(os_environ):
    os_environ['LC_MESSAGES'] = 'fr_FR.UTF-8'
    assert Locale('fr', 'FR') == Locale.default('LC_MESSAGES')
 
 
    def test_default(self, os_environ):
        for name in ['LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LC_MESSAGES']:
            os_environ[name] = ''
        os_environ['LANG'] = 'fr_FR.UTF-8'
        default = Locale.default('LC_MESSAGES')

src/t/r/trac-HEAD/trac/admin/tests/console.py   trac(Download)
        de_DE = Locale.parse('de_DE')
        try:
            default = Locale.default()
        except UnknownLocaleError:
            default = None