Home | Trees | Indices | Help |
|
---|
|
Classes | |
UnknownLocaleError Exception thrown when a locale is requested for which no locale data is available. |
|
Locale Representation of a specific locale. |
Functions | |||
str
|
|
||
str
|
|
||
tuple
|
|
Function Details |
Returns the system default locale for a given category, based on environment variables. >>> for name in ['LANGUAGE', 'LC_ALL', 'LC_CTYPE']: ... os.environ[name] = '' >>> os.environ['LANG'] = 'fr_FR.UTF-8' >>> default_locale('LC_MESSAGES') 'fr_FR'
|
Find the best match between available and requested locale strings. >>> negotiate_locale(['de_DE', 'en_US'], ['de_DE', 'de_AT']) 'de_DE' >>> negotiate_locale(['de_DE', 'en_US'], ['en', 'de']) 'de'
|
Parse a locale identifier into a (language, territory, variant) tuple. >>> parse_locale('zh_CN') ('zh', 'CN', None) The default component separator is "_", but a different separator can be
specified using the >>> parse_locale('zh-CN', sep='-') ('zh', 'CN', None)
See Also: IETF RFC 3066 |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Wed Jun 20 12:19:10 2007 | http://epydoc.sourceforge.net |