betty.locale package¶
Subpackages¶
- betty.locale.localizable package
- Submodules
- betty.locale.localizable.assertion module
- betty.locale.localizable.config module
StaticTranslationsLocalizableConfiguration
StaticTranslationsLocalizableConfiguration.__init__()
StaticTranslationsLocalizableConfiguration.dump()
StaticTranslationsLocalizableConfiguration.load()
StaticTranslationsLocalizableConfiguration.localize()
StaticTranslationsLocalizableConfiguration.set()
StaticTranslationsLocalizableConfiguration.update()
StaticTranslationsLocalizableConfigurationProperty
- Module contents
- Submodules
Submodules¶
Module contents¶
Provide the Locale API.
- betty.locale.get_data(locale: str | Locale) Locale [source]¶
Get locale metadata.
- Raises:
betty.locale.InvalidLocale – Raised if the given identifier is not a valid locale.
betty.locale.LocaleNotFoundError – Raised if the given locale cannot be found.
- betty.locale.get_display_name(locale: str | Locale, display_locale: str | Locale | None = None) str | None [source]¶
Return a locale’s human-readable display name.
- betty.locale.negotiate_locale(preferred_locales: str | Locale | Sequence[str | Locale], available_locales: Sequence[str | Locale]) Locale | None [source]¶
Negotiate the preferred locale from a sequence.