flutter_pipwave_localization 0.0.3+2 copy "flutter_pipwave_localization: ^0.0.3+2" to clipboard
flutter_pipwave_localization: ^0.0.3+2 copied to clipboard

Powerful and flexible localization package for Pipwave Flutter projects, featuring ICU message formatting, runtime locale switching, asset and dynamic translation file support.

Changelog #

0.0.3+2 2026-2-11 #

Enhancement #

  • Update BCP-47 locale tags to use proper casing for zh-CN in documentation and code comments

0.0.2 2026-1-28 #

Enhancement #

  • Support BCP-47 language code and rebuild layout after download assets

0.0.1+3 2026-1-16 #

Enhancement #

  • Add plural/gender detection and support positional/named args in translations.
  • Implement plural and gender leaf node detection in key extraction.
  • Mixture handling on named and unamed param.
  • Validation on ICU formatting with better argument handling and fallback logic.

0.0.1+2 2025-11-3 #

Documentation #

  • Updated README to document ICU message format plural support ("{count, plural, =0{message0} =1{message1} =2{message2} few{messageFew} many{messageMany} other{messageOther}}")

Enhancement #

  • Added code generation command documentation with default arguments
  • Clarified support for both object-based and ICU message format plurals

0.0.1+1 - 2025-10-21 #

Fixed #

  • Export flutter_localizations

Enhancement #

  • Add getter to get delegates

0.0.1 - 2024-12-21 #

Added #

  • Initial release of PW Localization Flutter package

  • Core Features:

    • EasyLocalization-compatible API for seamless migration
    • Full ICU message formatting support (plurals, gender, select)
    • Dynamic language file downloading from remote servers
    • Asset-based fallback for offline scenarios
    • Runtime locale switching capabilities
    • Type-safe translation key generation
  • Widgets & Components:

    • LocalizationProvider - Main widget for app-wide localization
    • LocalizedMaterialApp - Convenience widget combining MaterialApp with localization
    • CustomLocalizationDelegate - Flutter localization system integration
  • Services:

    • LocalizationService - Core service for translation management
    • ICU message formatting with intl package integration
    • Automatic fallback to asset files when downloads fail
  • Extensions:

    • BuildContext extension for easy translation access (context.tr())
    • String extension for direct translation ('key'.tr())
    • Convenient argument passing with trArgs()
  • Code Generation:

    • Translation key generator script (bin/generate.dart)
    • Automatic LocaleKeys class generation from JSON files
    • Type-safe translation key constants
  • Advanced Features:

    • Nested translation key support (e.g., welcome.title)
    • Plural rule handling (zero, one, many, other)
    • Gender-based translations
    • Complex ICU message patterns
    • Translation caching and memory management
    • Download progress tracking and error recovery

Technical Details #

  • Dependencies: Flutter 3.8.0+, Dart 3.9.0+
  • Key Packages: intl, dio, path_provider, flutter_localizations
  • Architecture: Singleton service pattern with widget integration
  • Storage: Asset-based with optional downloaded file caching
  • Error Handling: Comprehensive exception handling with graceful fallbacks

Migration Guide #

This package is designed as a drop-in replacement for EasyLocalization:

  1. Replace EasyLocalization widget with LocalizationProvider
  2. Update import statements to use flutter_pipwave_localization
  3. Translation access patterns remain the same (context.tr())
  4. Asset structure can remain unchanged
  5. Optional: Use code generation for type-safe keys

Breaking Changes #

  • None in initial release (designed for seamless migration)

Known Issues #

  • ICU message formatting may have edge cases with complex nested structures
  • Large translation files may impact initial load time
  • Network-dependent features require proper error handling
0
likes
0
points
401
downloads

Publisher

verified publisherpipwave.com

Weekly Downloads

Powerful and flexible localization package for Pipwave Flutter projects, featuring ICU message formatting, runtime locale switching, asset and dynamic translation file support.

Homepage

License

unknown (license)

Dependencies

dio, flutter, flutter_localizations, intl, path_provider

More

Packages that depend on flutter_pipwave_localization