# {py:mod}`arelle.Locale` ```{py:module} arelle.Locale ``` ```{autodoc2-docstring} arelle.Locale :allowtitles: ``` ## Module Contents ### Functions ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`getUserLocale ` - ```{autodoc2-docstring} arelle.Locale.getUserLocale :summary: ``` * - {py:obj}`getLanguageCode ` - ```{autodoc2-docstring} arelle.Locale.getLanguageCode :summary: ``` * - {py:obj}`getLanguageCodes ` - ```{autodoc2-docstring} arelle.Locale.getLanguageCodes :summary: ``` * - {py:obj}`findCompatibleLocale ` - ```{autodoc2-docstring} arelle.Locale.findCompatibleLocale :summary: ``` * - {py:obj}`bcp47LangToPosixLocale ` - ```{autodoc2-docstring} arelle.Locale.bcp47LangToPosixLocale :summary: ``` * - {py:obj}`posixLocaleToBCP47Lang ` - ```{autodoc2-docstring} arelle.Locale.posixLocaleToBCP47Lang :summary: ``` * - {py:obj}`getLocale ` - ```{autodoc2-docstring} arelle.Locale.getLocale :summary: ``` * - {py:obj}`getLocaleList ` - ```{autodoc2-docstring} arelle.Locale.getLocaleList :summary: ``` * - {py:obj}`availableLocales ` - ```{autodoc2-docstring} arelle.Locale.availableLocales :summary: ``` * - {py:obj}`availableBCP47LangTags ` - ```{autodoc2-docstring} arelle.Locale.availableBCP47LangTags :summary: ``` * - {py:obj}`languageCodes ` - ```{autodoc2-docstring} arelle.Locale.languageCodes :summary: ``` * - {py:obj}`setApplicationLocale ` - ```{autodoc2-docstring} arelle.Locale.setApplicationLocale :summary: ``` * - {py:obj}`setDisableRTL ` - ```{autodoc2-docstring} arelle.Locale.setDisableRTL :summary: ``` * - {py:obj}`rtlString ` - ```{autodoc2-docstring} arelle.Locale.rtlString :summary: ``` * - {py:obj}`format ` - ```{autodoc2-docstring} arelle.Locale.format :summary: ``` * - {py:obj}`format_string ` - ```{autodoc2-docstring} arelle.Locale.format_string :summary: ``` * - {py:obj}`currency ` - ```{autodoc2-docstring} arelle.Locale.currency :summary: ``` * - {py:obj}`ftostr ` - ```{autodoc2-docstring} arelle.Locale.ftostr :summary: ``` * - {py:obj}`atof ` - ```{autodoc2-docstring} arelle.Locale.atof :summary: ``` * - {py:obj}`atoi ` - ```{autodoc2-docstring} arelle.Locale.atoi :summary: ``` * - {py:obj}`format_picture ` - ```{autodoc2-docstring} arelle.Locale.format_picture :summary: ``` * - {py:obj}`format_decimal ` - ```{autodoc2-docstring} arelle.Locale.format_decimal :summary: ``` ```` ### Data ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`CHAR_MAX ` - ```{autodoc2-docstring} arelle.Locale.CHAR_MAX :summary: ``` * - {py:obj}`LC_ALL ` - ```{autodoc2-docstring} arelle.Locale.LC_ALL :summary: ``` * - {py:obj}`LC_COLLATE ` - ```{autodoc2-docstring} arelle.Locale.LC_COLLATE :summary: ``` * - {py:obj}`LC_CTYPE ` - ```{autodoc2-docstring} arelle.Locale.LC_CTYPE :summary: ``` * - {py:obj}`LC_MESSAGES ` - ```{autodoc2-docstring} arelle.Locale.LC_MESSAGES :summary: ``` * - {py:obj}`LC_MONETARY ` - ```{autodoc2-docstring} arelle.Locale.LC_MONETARY :summary: ``` * - {py:obj}`LC_NUMERIC ` - ```{autodoc2-docstring} arelle.Locale.LC_NUMERIC :summary: ``` * - {py:obj}`LC_TIME ` - ```{autodoc2-docstring} arelle.Locale.LC_TIME :summary: ``` * - {py:obj}`defaultLocaleCodes ` - ```{autodoc2-docstring} arelle.Locale.defaultLocaleCodes :summary: ``` * - {py:obj}`BCP47_LANGUAGE_REGION_SEPARATOR ` - ```{autodoc2-docstring} arelle.Locale.BCP47_LANGUAGE_REGION_SEPARATOR :summary: ``` * - {py:obj}`POSIX_LANGUAGE_REGION_SEPARATOR ` - ```{autodoc2-docstring} arelle.Locale.POSIX_LANGUAGE_REGION_SEPARATOR :summary: ``` * - {py:obj}`POSIX_LOCALE_ENCODING_SEPARATOR ` - ```{autodoc2-docstring} arelle.Locale.POSIX_LOCALE_ENCODING_SEPARATOR :summary: ``` * - {py:obj}`POSIX_LOCALE_DEFAULT_ENCODING ` - ```{autodoc2-docstring} arelle.Locale.POSIX_LOCALE_DEFAULT_ENCODING :summary: ``` * - {py:obj}`POSIX_PSEUDO_LOCALES ` - ```{autodoc2-docstring} arelle.Locale.POSIX_PSEUDO_LOCALES :summary: ``` * - {py:obj}`BCP47_LANGUAGE_TAG_RE ` - ```{autodoc2-docstring} arelle.Locale.BCP47_LANGUAGE_TAG_RE :summary: ``` * - {py:obj}`POSIX_LOCALENAME_RE ` - ```{autodoc2-docstring} arelle.Locale.POSIX_LOCALENAME_RE :summary: ``` * - {py:obj}`iso3region ` - ```{autodoc2-docstring} arelle.Locale.iso3region :summary: ``` ```` ### API ````{py:data} CHAR_MAX :canonical: arelle.Locale.CHAR_MAX :value: > 127 ```{autodoc2-docstring} arelle.Locale.CHAR_MAX ``` ```` ````{py:data} LC_ALL :canonical: arelle.Locale.LC_ALL :value: > 6 ```{autodoc2-docstring} arelle.Locale.LC_ALL ``` ```` ````{py:data} LC_COLLATE :canonical: arelle.Locale.LC_COLLATE :value: > 3 ```{autodoc2-docstring} arelle.Locale.LC_COLLATE ``` ```` ````{py:data} LC_CTYPE :canonical: arelle.Locale.LC_CTYPE :value: > 0 ```{autodoc2-docstring} arelle.Locale.LC_CTYPE ``` ```` ````{py:data} LC_MESSAGES :canonical: arelle.Locale.LC_MESSAGES :value: > 5 ```{autodoc2-docstring} arelle.Locale.LC_MESSAGES ``` ```` ````{py:data} LC_MONETARY :canonical: arelle.Locale.LC_MONETARY :value: > 4 ```{autodoc2-docstring} arelle.Locale.LC_MONETARY ``` ```` ````{py:data} LC_NUMERIC :canonical: arelle.Locale.LC_NUMERIC :value: > 1 ```{autodoc2-docstring} arelle.Locale.LC_NUMERIC ``` ```` ````{py:data} LC_TIME :canonical: arelle.Locale.LC_TIME :value: > 2 ```{autodoc2-docstring} arelle.Locale.LC_TIME ``` ```` ````{py:data} defaultLocaleCodes :canonical: arelle.Locale.defaultLocaleCodes :value: > None ```{autodoc2-docstring} arelle.Locale.defaultLocaleCodes ``` ```` ````{py:data} BCP47_LANGUAGE_REGION_SEPARATOR :canonical: arelle.Locale.BCP47_LANGUAGE_REGION_SEPARATOR :value: > '-' ```{autodoc2-docstring} arelle.Locale.BCP47_LANGUAGE_REGION_SEPARATOR ``` ```` ````{py:data} POSIX_LANGUAGE_REGION_SEPARATOR :canonical: arelle.Locale.POSIX_LANGUAGE_REGION_SEPARATOR :value: > '_' ```{autodoc2-docstring} arelle.Locale.POSIX_LANGUAGE_REGION_SEPARATOR ``` ```` ````{py:data} POSIX_LOCALE_ENCODING_SEPARATOR :canonical: arelle.Locale.POSIX_LOCALE_ENCODING_SEPARATOR :value: > '.' ```{autodoc2-docstring} arelle.Locale.POSIX_LOCALE_ENCODING_SEPARATOR ``` ```` ````{py:data} POSIX_LOCALE_DEFAULT_ENCODING :canonical: arelle.Locale.POSIX_LOCALE_DEFAULT_ENCODING :value: > 'utf-8' ```{autodoc2-docstring} arelle.Locale.POSIX_LOCALE_DEFAULT_ENCODING ``` ```` ````{py:data} POSIX_PSEUDO_LOCALES :canonical: arelle.Locale.POSIX_PSEUDO_LOCALES :value: > 'frozenset(...)' ```{autodoc2-docstring} arelle.Locale.POSIX_PSEUDO_LOCALES ``` ```` ````{py:data} BCP47_LANGUAGE_TAG_RE :canonical: arelle.Locale.BCP47_LANGUAGE_TAG_RE :value: > 'compile(...)' ```{autodoc2-docstring} arelle.Locale.BCP47_LANGUAGE_TAG_RE ``` ```` ````{py:data} POSIX_LOCALENAME_RE :canonical: arelle.Locale.POSIX_LOCALENAME_RE :value: > 'compile(...)' ```{autodoc2-docstring} arelle.Locale.POSIX_LOCALENAME_RE ``` ```` ````{py:function} getUserLocale(posixLocale: str | None = None) -> tuple[arelle.typing.LocaleDict, str | None] :canonical: arelle.Locale.getUserLocale ```{autodoc2-docstring} arelle.Locale.getUserLocale ``` ```` ````{py:function} getLanguageCode() -> str :canonical: arelle.Locale.getLanguageCode ```{autodoc2-docstring} arelle.Locale.getLanguageCode ``` ```` ````{py:function} getLanguageCodes(configLang: str | None = None) -> list[str] :canonical: arelle.Locale.getLanguageCodes ```{autodoc2-docstring} arelle.Locale.getLanguageCodes ``` ```` ````{py:function} findCompatibleLocale(localeValue: str | None) -> str | None :canonical: arelle.Locale.findCompatibleLocale ```{autodoc2-docstring} arelle.Locale.findCompatibleLocale ``` ```` ````{py:function} bcp47LangToPosixLocale(bcp47Lang: str) -> str :canonical: arelle.Locale.bcp47LangToPosixLocale ```{autodoc2-docstring} arelle.Locale.bcp47LangToPosixLocale ``` ```` ````{py:function} posixLocaleToBCP47Lang(posixLocale: str) -> str :canonical: arelle.Locale.posixLocaleToBCP47Lang ```{autodoc2-docstring} arelle.Locale.posixLocaleToBCP47Lang ``` ```` ````{py:function} getLocale() -> str | None :canonical: arelle.Locale.getLocale ```{autodoc2-docstring} arelle.Locale.getLocale ``` ```` ````{py:data} iso3region :canonical: arelle.Locale.iso3region :value: > None ```{autodoc2-docstring} arelle.Locale.iso3region ``` ```` ````{py:function} getLocaleList() -> list[str] :canonical: arelle.Locale.getLocaleList ```{autodoc2-docstring} arelle.Locale.getLocaleList ``` ```` ````{py:function} availableLocales() -> frozenset[str] :canonical: arelle.Locale.availableLocales ```{autodoc2-docstring} arelle.Locale.availableLocales ``` ```` ````{py:function} availableBCP47LangTags() -> frozenset[str] :canonical: arelle.Locale.availableBCP47LangTags ```{autodoc2-docstring} arelle.Locale.availableBCP47LangTags ``` ```` ````{py:function} languageCodes() -> dict[str, str] :canonical: arelle.Locale.languageCodes ```{autodoc2-docstring} arelle.Locale.languageCodes ``` ```` ````{py:function} setApplicationLocale() -> None :canonical: arelle.Locale.setApplicationLocale ```{autodoc2-docstring} arelle.Locale.setApplicationLocale ``` ```` ````{py:function} setDisableRTL(disableRTL: bool) -> None :canonical: arelle.Locale.setDisableRTL ```{autodoc2-docstring} arelle.Locale.setDisableRTL ``` ```` ````{py:function} rtlString(source: str, lang: str | None) -> str :canonical: arelle.Locale.rtlString ```{autodoc2-docstring} arelle.Locale.rtlString ``` ```` ````{py:function} format(conv: arelle.typing.LocaleDict, percent: str, value: typing.Any, grouping: bool = False, monetary: bool = False, *additional: str) -> str :canonical: arelle.Locale.format ```{autodoc2-docstring} arelle.Locale.format ``` ```` ````{py:function} format_string(conv: arelle.typing.LocaleDict, f: str, val: typing.Any, grouping: bool = False) -> str :canonical: arelle.Locale.format_string ```{autodoc2-docstring} arelle.Locale.format_string ``` ```` ````{py:function} currency(conv: arelle.typing.LocaleDict, val: int | float, symbol: bool = True, grouping: bool = False, international: bool = False) -> str :canonical: arelle.Locale.currency ```{autodoc2-docstring} arelle.Locale.currency ``` ```` ````{py:function} ftostr(conv: arelle.typing.LocaleDict, val: typing.Any) -> str :canonical: arelle.Locale.ftostr ```{autodoc2-docstring} arelle.Locale.ftostr ``` ```` ````{py:function} atof(conv: arelle.typing.LocaleDict, string: str, func: collections.abc.Callable[[str], typing.Any] = float) -> typing.Any :canonical: arelle.Locale.atof ```{autodoc2-docstring} arelle.Locale.atof ``` ```` ````{py:function} atoi(conv: arelle.typing.LocaleDict, str: arelle.Locale.atoi.str) -> int :canonical: arelle.Locale.atoi ```{autodoc2-docstring} arelle.Locale.atoi ``` ```` ````{py:function} format_picture(conv: arelle.typing.LocaleDict, value: typing.Any, picture: str) -> str :canonical: arelle.Locale.format_picture ```{autodoc2-docstring} arelle.Locale.format_picture ``` ```` ````{py:function} format_decimal(conv: arelle.typing.LocaleDict | None, value: decimal.Decimal, intPlaces: int = 1, fractPlaces: int = 2, curr: str = '', sep: str | None = None, grouping: int | None = None, dp: str | None = None, pos: str | None = None, neg: str | None = None, trailpos: str | None = None, trailneg: str | None = None) -> str :canonical: arelle.Locale.format_decimal ```{autodoc2-docstring} arelle.Locale.format_decimal ``` ````