Dec-25-2018, 10:51 AM
here's the doc on that: https://docs.python.org/3.7/library/loca...LC_NUMERIC
'locale.localeconv()' Returns the database of the local conventions as a dictionary.
Leave testing to you.
Quote:locale.setlocale(category, locale=None)I haven't actually tried it, but looks like it will accommodate numbers using LC_NUMERIC
If locale is given and not None, setlocale() modifies the locale setting for the category. The available categories are listed in the data description below. locale may be a string, or an iterable of two strings (language code and encoding). If it’s an iterable, it’s converted to a locale name using the locale aliasing engine. An empty string specifies the user’s default settings. If the modification of the locale fails, the exception Error is raised. If successful, the new locale setting is returned.
If locale is omitted or None, the current setting for category is returned.
setlocale() is not thread-safe on most systems. Applications typically start with a call of
import locale
locale.setlocale(locale.LC_ALL, '')
This sets the locale for all categories to the user’s default setting (typically specified in the LANG environment variable). If the locale is not changed thereafter, using multithreading should not cause problems.
'locale.localeconv()' Returns the database of the local conventions as a dictionary.
Leave testing to you.