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

All Samples(4)  |  Call(4)  |  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/b/l/bloodhound-HEAD/trac/trac/admin/console.py   bloodhound(Download)
        import babel
        try:
            locale = get_negotiated_locale([LANG]) or babel.Locale.default()
        except babel.UnknownLocaleError:
            pass

src/t/r/Trac-1.0.1/trac/admin/console.py   Trac(Download)
        import babel
        try:
            locale = get_negotiated_locale([LANG]) or babel.Locale.default()
        except babel.UnknownLocaleError:
            pass

src/c/o/coinbox-core-HEAD/cbpos/core.py   coinbox-core(Download)
        # See: http://babel.edgewall.org/ticket/98 
        try:
            locale = Locale.default()
        except ValueError:
            logger.debug('Babel did not understand default locale')

src/b/l/bloodhound-HEAD/installer/bloodhound_setup.py   bloodhound(Download)
            try:
                locale = get_negotiated_locale([LANG])
                locale = locale or babel.Locale.default()
            except babel.UnknownLocaleError:
                pass