locale
The locale module provides access to the POSIX locale database, which allows programmers to handle certain cultural issues in an application without knowing all the specifics of each country where the software is executed. A “locale” defines a set of parameters that describe the representation of strings, time, numbers, and currency. These parameters are grouped into the following category codes:
Category | Description |
---|---|
LC_CTYPE | Character conversion and comparison. |
LC_COLLATE | String sorting. Affects strcoll() and strxfrm(). |
LC_TIME | Time formatting. Affects time.strftime(). |
LC_MONETARY | Formatting of monetary values. |
LC_MESSAGES | Message display. This may affect error messages returned by functions such as os.strerror(). |
LC_NUMERIC | Number formatting. Affects ... |
Get Python: Essential Reference, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.