best_localization 2.0.3
best_localization: ^2.0.3 copied to clipboard
A Flutter localization package with dynamic translations and Kurdish support.
Changelog #
All notable changes to this project will be documented in this file.
2.0.3 2026-1-1 #
Fix
- Fix an issue with cupertino
2.0.2 - 2025-12-31 #
Fix
- Fix an issue with cupertino
2.0.1 - 2025-12-31 #
Fix
- Fix an issue with cupertino
2.0.0 - 2025-12-22 #
New Features #
- Directly Translate throu Text method or String
- Text('hello').tr() or Text('hello').translate()
- New way of gender and plural
Fix
- Issue of gender and plural fixed
1.2.1 - 2025-11-16 #
🎉 New Features #
Added
- Translation Key Verification Tool 🔍
TranslationVerifierclass for programmatic verification- Command-line tool:
dart run best_localization:verify_translations - Verify all translations against a reference locale
- Compare two specific locales
- Find duplicate values (same translation for different keys)
- Find similar keys (potential typos using Levenshtein distance)
- Generate detailed reports in text or JSON format
- Calculate coverage percentage per locale
- CI/CD integration support with exit codes
- Pre-commit hook examples
- Commands:
verify <path>- Verify all translation filescompare <file1> <file2>- Compare two filesduplicates <file>- Find duplicate valuessimilar <file>- Find similar keys
- Features:
- Missing key detection
- Extra key detection
- Empty value detection
- Duplicate value detection
- Similar key detection (configurable threshold)
- JSON output for automation
- Reference locale selection
Documentation
- Added comprehensive VERIFICATION.md guide
- Updated README.md with verification tool section
- Added CI/CD integration examples
- Added programmatic usage examples
- Updated pubspec.yaml with executable entry
1.0.2 - 2025-11-15 #
- Enhance readme.md
- Some changes
1.0.0 - 2025-11-15 #
🎉 Major Release - New Features #
Added
-
Multiple File Format Support 🎉
- JSON Loader: Load translations from JSON files (single or multiple files)
- CSV Loader: Load translations from CSV files (columns or rows format)
- YAML Loader: Load translations from YAML files
- XML Loader: Load translations from XML files
- HTTP Loader: Load translations from remote API with caching support
-
Remote Translations 🎉
HttpLoaderclass for fetching translations from API- Automatic caching with
shared_preferences - Configurable cache duration (default: 24 hours)
- Custom HTTP headers support (for authentication)
- Offline fallback using expired cache
- Works seamlessly with
Loaders.remote()
-
Fallback Locale Support 🎉
- Added
fallbackLocaleparameter toBestLocalizationDelegate - Automatic fallback to default language when translation is missing
- Works with all loader types (JSON, CSV, YAML, XML, HTTP, Map)
- Better UX for incomplete translations
- Added
-
Loaders Class 🎉
- Easy-to-use static methods for all loaders
Loaders.json()- Load from JSON filesLoaders.csv()- Load from CSV filesLoaders.yaml()- Load from YAML filesLoaders.xml()- Load from XML filesLoaders.remote()- Load from remote APILoaders.jsonString()- Load from JSON stringLoaders.csvString()- Load from CSV string
-
Factory Methods
BestLocalizationDelegate.fromJson()- Create delegate from JSON loaderBestLocalizationDelegate.fromCsv()- Create delegate from CSV loaderBestLocalizationDelegate.fromYaml()- Create delegate from YAML loaderBestLocalizationDelegate.fromXml()- Create delegate from XML loaderBestLocalizationDelegate.fromHttp()- Create delegate from HTTP loaderBestLocalizationDelegate.fromMap()- Create delegate from mapBestLocalizationDelegate.fromLoader()- Create delegate from any loader
-
BuildContext Extensions
context.tr()- Translate with optional argumentscontext.localization- Get BestLocalization instancecontext.currentLocale- Get current localecontext.languageCode- Get language codecontext.isKurdish- Check if Kurdishcontext.isArabic- Check if Arabiccontext.isEnglish- Check if Englishcontext.isRTL- Check if RTL languagecontext.textDirection- Get text direction
Changed #
- Updated package dependencies to use flexible version ranges
- Enhanced Kurdish Cupertino localizations with missing properties
- Improved code organization with separate loader files
Fixed #
- Fixed missing implementations in
KurdishCupertinoLocalizations - Resolved compatibility issues with different Flutter versions
0.0.1 - 2024-12-25 #
Added #
- Initial release of
best_localizationpackage. - Support for dynamic translations using Dart maps.
- Interpolation for dynamic placeholders (e.g.,
Hello, {name}!). - Pluralization for managing singular and plural text forms.
- Kurdish (
ku) localization for Material and Cupertino widgets. - Seamless integration with Flutter's localization system via
BestLocalizationDelegate. - Example implementations for both Material and Cupertino apps.
- Comprehensive date and number formatting for Kurdish using
intl.
Fixed #
- N/A (First release)
Changed #
- N/A (First release)