Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

pyxpo-localization

The user's languages, region formats and calendar settings for pyxpo apps. The API follows expo-localization.

pip install pyxpo-localization
[tool.pyxpo]
modules = ["localization"]
import pyxpo_localization as Localization

locale = Localization.get_locales()[0]
print(locale.language_tag, locale.region_code, locale.currency_code)   # en-IN IN INR
cal = Localization.get_calendars()[0]
print(cal.time_zone, cal.uses_24_hour_clock, cal.first_weekday)        # Asia/Kolkata False 1

Every name also has its expo-localization spelling (Localization.getLocales, Localization.useCalendars). Records accept Expo's camelCase keys too: locale["languageTag"], and locale.to_dict() gives the camelCase dict.

The values are read once when the app starts. On the desktop they come from LC_ALL / LC_MESSAGES / LANG and the system time zone, and the fields the desktop cannot tell (currency, separators) are None.

Functions

Function Returns
get_locales() list[Locale], the preferred languages, most preferred first. Never empty.
get_calendars() list[Calendar], the user's calendars, preferred first. Never empty.
use_locales(), use_calendars() The same, for use in components.

Locale

Field Example Notes
language_tag "en-IN" BCP 47 tag.
language_code "en"
language_script_code "Hant" None when the tag has no script.
region_code "IN" iOS: the region setting. Android: the locale's region.
language_region_code "IN" The region in the language tag.
currency_code, currency_symbol "INR", "₹" iOS: from the region setting.
language_currency_code, language_currency_symbol "INR", "₹" From the language tag's region.
decimal_separator, digit_grouping_separator ".", ","
text_direction "ltr" "ltr" or "rtl".
measurement_system "metric" "metric", "us" or "uk".
temperature_unit "celsius" "celsius" or "fahrenheit". Follows the user's setting on iOS 16+ and Android 14+.

Calendar

Field Example Notes
calendar "gregory" CLDR name, as in JavaScript Intl.
time_zone "Asia/Kolkata" IANA id.
uses_24_hour_clock False
first_weekday 1 1 is Sunday, 7 is Saturday.

Platforms

iOS 15+, Android 7 (API 24)+. No permissions.

Metadata

Release files for pyxpo-localization 0.1.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyxpo-localization 0.1.0a1
File Size Uploaded
pyxpo_localization-0.1.0a1.tar.gz 9.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyxpo-localization 0.1.0a1
File Interpreter ABI Platform
pyxpo_localization-0.1.0a1-py3-none-any.whl Python 3 none any Details

Total release size: 20.0 kB

Release files / pyxpo_localization-0.1.0a1.tar.gz

Download URL pyxpo_localization-0.1.0a1.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1a7c2e6a1b74c1c675f46a82760ea38d3b733d8547e4952e3ae3134e394aacc1
BLAKE2b-256 checksum
How to use checksums
9070d9ba3d7126872f7a7fde9e5688c9a155f09382f8718920a477afeeaf8b9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release files / pyxpo_localization-0.1.0a1-py3-none-any.whl

Download URL pyxpo_localization-0.1.0a1-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
be7670d44b822d9dcae2a6980937e3158b76ffd7a775caede49811aeca5ed287
BLAKE2b-256 checksum
How to use checksums
f641d435df8b06754a5e27da15ddcca2feeec3040ff15bc4b2913b4084015b70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0a1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page