A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-December/106871.html below:

[Python-Dev] Locale-specific formatting

[Python-Dev] Locale-specific formatting [Python-Dev] Locale-specific formattingMRAB python at mrabarnett.plus.com
Sat Dec 18 19:26:43 CET 2010
On 18/12/2010 09:26, "Martin v. Löwis" wrote:
>> Comments?
>
> How do you implement that? In particular, how do you retrieve
> information for different locales in a single program?
>
The locale module would be able to return a named locale dict:

 >>> loc = locale.getnamedlocale('en_UK')

or:

 >>> loc = locale.namedlocales['en_UK']

The dict would be like what locale.localeconv() returns.

The str.format method would then be able to use that dict.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4