xsoulspace_locale library

Classes

KeyboardLanguage
Keyboard language representation for input methods.
LocaleLogic
Core locale management logic for Flutter applications.
Locales
Utility class for accessing supported locales and fallback locale.
LocalizationConfig
Configuration singleton for locale support and fallback settings.
LocalizedMap
Type-safe container for localized string values.
NamedLocale
User-friendly locale representation for language selection UI.
UiLanguage
Represents a supported language with code and display name.
UiLocaleResource
Notifier that wraps a Locale value and notifies listeners of changes. Always contains a valid locale for display purposes.

Extensions

UiLanguageX on Locale
Extension to convert Flutter locales to UiLanguage.

Properties

namedLocalesMap Map<UiLanguage, NamedLocale>
Maps supported languages to their named locale representations.
no setter

Functions

getLanguageCodeByStr(String language) String
Extracts language code from language string.
localeFromString(String? languageCode) Locale?
Converts language code string to Flutter locale.
localeToString(Locale? locale) String?
Converts Flutter locale to language code string.
localeValueFromMap(dynamic map) LocalizedMap
Converts dynamic map to localized value map.
localeValueToMap(Map<UiLanguage, String> locales) Map<String, String>
Converts localized map to string map for JSON serialization.