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

All Samples(265)  |  Call(62)  |  Derive(4)  |  Import(199)
Representation of a specific locale.

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

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

src/f/i/firefox-flicks-HEAD/flicks/base/helpers.py   firefox-flicks(Download)
import json as json_mod
 
from django.utils.translation import get_language
 
from babel.core import Locale, UnknownLocaleError
    except UnknownLocaleError:
        # Default to en-US
        return Locale('en', 'US')
 
 

src/i/n/intranet-HEAD/src/intranet3/intranet3/views/employees/table.py   intranet(Download)
import logging
 
from babel.core import Locale
from pyramid.view import view_config
 
from intranet3 import helpers as h
 
locale = Locale('en', 'US')
 
 

src/i/n/intranet-HEAD/src/intranet3/intranet3/views/presence.py   intranet(Download)
# -*- coding: utf-8 -*-
import datetime
 
from babel.core import Locale
from sqlalchemy import func
hour_9 = datetime.time(9, 0, 0)
 
locale = Locale('en', 'US')
 
 

src/a/f/affiliates-HEAD/affiliates/base/utils.py   affiliates(Download)
from django.utils.translation import get_language
 
from babel.core import Locale, UnknownLocaleError
from funfactory.urlresolvers import reverse
from product_details import product_details
    except (UnknownLocaleError, ValueError):
        # Default to en-US
        return Locale('en', 'US')
 
 

src/m/u/Muntjac-1.1.2/muntjac/util.py   Muntjac(Download)
import paste.webkit
 
from babel.core import Locale, UnknownLocaleError
 
 
            return Locale.default()
        except UnknownLocaleError:
            return Locale('en', 'US')
 
 

src/m/u/muntjac-HEAD/muntjac/util.py   muntjac(Download)
import paste.webkit
 
from babel.core import Locale, UnknownLocaleError
 
 
            return Locale.default()
        except UnknownLocaleError:
            return Locale('en', 'US')
 
 

src/t/i/Tinkerer-1.4.2/tinkerer/ext/metadata.py   Tinkerer(Download)
from functools import partial
from sphinx.util.compat import Directive
from babel.core import Locale
from babel.dates import format_date
import tinkerer
    env = app.builder.env
    language = app.config.language
    locale = Locale.parse(language) if language else Locale('en', 'US')
    format_ui_date = partial(
        format_date, format=UIStr.TIMESTAMP_FMT, locale=locale)

src/t/i/tinkerer-HEAD/tinkerer/ext/metadata.py   tinkerer(Download)
from functools import partial
from sphinx.util.compat import Directive
from babel.core import Locale
from babel.dates import format_date
import tinkerer
    env = app.builder.env
    language = app.config.language
    locale = Locale.parse(language) if language else Locale('en', 'US')
    format_ui_date = partial(
        format_date, format=UIStr.TIMESTAMP_FMT, locale=locale)

src/g/l/glow-HEAD/po2js.py   glow(Download)
 
import path
from babel.core import Locale, UnknownLocaleError
from babel.messages import pofile
 
        print lang
        try:
            locale = Locale(lang)
        except UnknownLocaleError:
            print 'Unknown locale:', lang
            locale = Locale(DEFAULT)

src/f/j/fjord-HEAD/vendor/packages/Babel/babel/__init__.py   fjord(Download)
"""
 
from babel.core import UnknownLocaleError, Locale, default_locale, \
     negotiate_locale, parse_locale, get_locale_identifier
 

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