LocalizationService class

Service for handling language detection and localization

Constructors

LocalizationService()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

supportedLanguages List<String>
Get the list of all supported languages
no setter

Static Methods

detectLanguage() String
Detect the current device language
getLanguageName(String languageCode) String
Get language name from code
getTranslation(String key, [String? languageCode]) String
Get a specific translation key for a language
getTranslations([String? languageCode]) Map<String, String>
Get translations for a specific language code If languageCode is null, auto-detect the device language
isRTL(String languageCode) bool
Check if a language uses RTL (Right-to-Left) text direction