language_translator 0.0.6+1
language_translator: ^0.0.6+1 copied to clipboard
A lightweight Flutter package for easy multilingual support, providing string translation with or without context, RTL support, and a custom widget for translated text display.
Changelog #
All notable changes to this project will be documented in this file.
0.0.6+1 #
0.0.6 #
0.0.5+1 #
0.0.5 #
Added #
HydratedLanguageCubit
for persisted language state management usinghydrated_bloc
.LanguageSelectionCubit
for temporary UI-level language selection.AppLanguage
refactored with defaultLocale
andsupportedLanguages
.- Extension method
sortedByName()
for sortingLocale
list alphabetically. LanguageLabelUtil
with RTL support check viaisRtl
method.- Reusable language picker bottom sheet with search functionality.
- Language toggle button using two
Locale
values.
Changed #
- Updated project architecture to follow SOLID and DRY principles across language and theme handling.
- Language configuration is now optional via
DefaultLanguageConfig
with.copyWith()
support. - MaterialApp now uses
locale
andthemeMode
from respective Cubits. - BlocProvider registration for language and theme Cubits moved to
get_it
DI structure.
Removed #
- Redundant language setting logic duplicated across multiple classes.
0.0.4 #
-
Initial support for basic language codes:
- English (
en
) - Hindi (
hi
) - Bengali (
bn
) - Punjabi (
pa
) - Spanish (
es
)
- English (
-
Extended
supportLanguage
list to include all languages supported byflutter_localizations
. -
Updated
getGlobalLanguageName(String code)
function to return human-readable names for all supported languages using ISO 639-1 codes. -
Included region variants like
en_US
,pt_BR
, andzh_TW
for better locale support.
0.0.3 #
- Upgrade Dependencies.
- Included
textAlign
,textDirection
in theAppTranslatedTextView
0.0.2 #
- Upgrade Dependencies.
0.0.1 #
Initial release #
- Added support for multiple languages with default fallback.
- Translate strings with or without BuildContext.
- Included AppTranslatedTextView widget for simplified UI usage.
- Added utility for RTL language detection.
- JSON-based localization with asset loading.
- Localization delegate integration.
- Utility class for global language name access.
- Singleton pattern for core utilities.
- Supports 20+ languages out-of-the-box.