Localized formatting functions. These functions extract localization
data from config files located in the data/directory.
|
|
|
|
|
|
|
|
|
|
|
get_countries(locale=None)
Returns list of tuples, consisting of international country code and
localized name, e.g. |
source code
|
|
|
|
get_country(key,
locale=None)
Returns localized name of country based on international country code |
source code
|
|
|
|
|
|
|
get_language(key,
locale=None)
Returns localized name of language based on language code |
source code
|
|
|
|
get_month_names(locale=None)
Returns list of full month names, starting with January |
source code
|
|
|
|
get_abbr_month_names(locale=None)
Returns list of abbreviated month names, starting with Jan |
source code
|
|
|
|
get_weekday_names(locale=None)
Returns list of full weekday names |
source code
|
|
|
|
get_abbr_weekday_names(locale=None)
Returns list of abbreviated weekday names |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
format_decimal(value,
num_places,
locale=None)
Returns number formatted with grouping for thousands and correct
notation, e.g. |
source code
|
|
|
|
format_currency(value,
locale=None)
Returns formatted currency value |
source code
|
|
|
|
parse_number(value,
locale=None)
Takes localized number string and returns a long integer (or throws
ValueError if bad format) |
source code
|
|
|
|
parse_decimal(value,
locale=None)
Takes localized decimal string and returns a float (or throws
ValueError if bad format) |
source code
|
|
|
|
|
|
|
format_date(dt,
format='medium',
locale=None,
time_format='',
date_format='')
Returns formatted date value. |
source code
|
|