Localization Service
Component Detail
Service Layer
medium complexity
Shared Component
mobile
1
Dependencies
1
Dependents
0
Entities
0
Integrations
Description
Wraps Flutter's LocalizationsDelegate and intl package to provide a runtime locale-switching API. It loads the correct ARB string bundle for the selected Sami language, resolves string keys at runtime, handles fallback to the default locale when a translation is missing, and notifies the widget tree to rebuild with the new locale. Designed for extensibility so additional Sami dialects or minority languages can be added by dropping in new ARB files without code changes.
localization-service
Responsibilities
- Resolve and load locale-specific ARB string bundles at runtime
- Expose a language-switching API consumed by the Language Settings Screen
- Provide fallback resolution when a Sami translation key is missing
- Notify the widget tree to rebuild upon locale change
- Support dynamic addition of new locale ARB files without architectural changes
Interfaces
setLocale(locale)
getCurrentLocale()
getSupportedLocales()
translate(key, {params})
isSamiLocale(locale)
getFallbackLocale()
reloadTranslations()
onLocaleChanged(callback)