Skip to main content

flutter_localization 1.0.0 copy "flutter_localization: ^1.0.0" to clipboard
flutter_localization: ^1.0.0 copied to clipboard

Flutter Localization is a package use for in-app localization with map data. More easier and faster to implement and inspired by the flutter_localizations itself.

1.0.0 #

  • Convert the plugin to a pure Flutter package
  • Use Flutter's platform dispatcher to determine the platform locale
  • Remove native plugin implementations and plugin-only dependencies
  • Keep package translations on the same locale as Flutter. Pass locale: FlutterLocalization.instance.currentLocale to MaterialApp. FlutterLocalization is now a ChangeNotifier; listen to it to rebuild when the language changes.
  • Subscribe to language changes with addListener and removeListener, or with ListenableBuilder, so more than one listener can follow the locale and each can be removed on dispose. onTranslatedLanguage still runs for existing apps, but it is deprecated: assigning it replaces the previous callback.
  • Match locales by language, script, and country. translate() accepts a language code or a full locale tag such as en-US or zh-Hant, and a new function translateLocale() accepts a Locale. Language-only requests that match more than one variant are rejected.
  • Overlapping JSON loads no longer let a slower asset replace the locale that was selected later. Decoded JSON is cached per locale.
  • Preload configured JSON assets from init and translate, starting with the active locale, and keep those decoded maps for later loads. The localization delegate reloads strings when the map or JSON sources are replaced.
  • Validate startup and saved locales in init. A saved locale that matches one supported locale is kept, and rewritten when resolution changes its script or country. An unsupported or unreadable saved locale is removed.
  • Parse locale tags by subtag shape. en stays language-only, zh-Hant-TW keeps its script and country, and POSIX values such as en_US.UTF-8 drop the encoding and modifier before the language, script, and country are read.
  • Require each JSON translation file to be a flat object of string values. Nested objects, arrays, numbers, booleans, and null fail the load with FormatException.
  • Keep missing translations readable. getString returns key not found when the key or translator is missing. formatString keeps the original text in those cases, including when the context has no translator.
  • Look up built-in language names from a fixed catalog of each language's own name. The lookup uses the language code only and does not translate that name into the current UI locale.

0.4.1 #

  • Android - Migrate to build-in Kotlin

0.4.0 #

  • Add support for JSON Asset file locale
  • Add support for Swift Package Manager
  • Update some dependencies use to support the package

0.3.3 #

  • Resolve issue with Platform._localeName on Web platform

0.3.2 #

  • Update environment sdk to ^3.0.0
  • Update some dependencies use to support the package

0.3.1 #

  • Merge PR #34 from @probepark: Fix issue with Platform Locale for web support

0.3.0 #

  • Breaking change: added ensureInitialized () function (check more information at README or EXAMPLE)

0.2.3 #

  • Update some dependencies use to support the package
  • Update Android Gradle, Java and Kotlin version
  • Increase compileSdkVersion to 34

0.2.2 #

  • Fixed issue of flutter web registration: error import dart:html

0.2.1 #

  • Update some dependencies use to support the package

0.2.0 #

  • Added scriptCode support in the MapLocale model. Thanks to @dujiepeng for the suggestion
  • Refactor all Locale object to use Locale.fromSubtags
  • Update some dependencies use to support the package

0.1.14 #

  • Increase android minSdk support to 21 and add support to higher gradle build tools version

0.1.13 #

  • Added StringsUtil and ContextExtension for helping with localization text. Check the readme page at [Some update note] section.

0.1.12 #

  • Add LocaleExtension for getting the locale identifier (en_US, km_KH, ja_JP, ect)

0.1.11 #

  • Add fontFamily param in MapLocale model for providing font family for each language (this field is optional)
  • Update some dependencies use to support the package

0.1.10 #

  • Update some dependencies use to support the package

0.1.9 #

  • Fixed missing web plugin support
  • Updated README documentation

0.1.8 #

  • Remove getString method from FlutterLocalization class
  • getString extension now required context parameter

0.1.7 #

  • Added string extension for more easy use of the getString function

0.1.6 #

  • Update some dependencies use to support the package
  • Remove the required context in getString () method

0.1.5 #

  • Add condition to the translate () function to prevent it recall on the same provided languageCode
  • Update some dependencies use to support the package
  • Small make-change on example file

0.1.4 #

  • I have found some issues and a little bit of low performance when using the load from json file method, so I decided to remove it for better usage
  • Remove the old init () function and rename the initWithMap () to init () instead

0.1.3 #

  • Optimize some code and allowed the onTranslatedLanguage callback to be null. Thanks to @Hasankanso for the suggestion
  • NOTE: init () function will be removed soon for better load time and performance, please use initWithMap () instead

0.1.2 #

  • Update some dependencies use to support the package and README document

0.1.1 #

  • Add plugin for web support

0.1.0 #

  • Migrate to support null-safety

0.0.12 #

  • Update some dependencies use to support the package

0.0.11 #

  • Add the possibility to do localization with Map<String, dynamic> instead of json file. Check the README or example for more information with the initWithMap () function

0.0.10 #

  • Solve the problem where currentLocale is null when try to call at the main.dart after initState ()

0.0.9 #

  • Nothing new, just refactor some code and performance

0.0.8 #

  • Rollback change on 0.0.7 which cause problem to the localization process

0.0.7 #

  • Add possibility to add more custom delegate at the init () function

0.0.6 #

  • Added get language name feature
  • In init () function, rename languageCodes to supportedLanguageCodes
  • Added save parameter in translate () function, so you can decide to save the cache or not

0.0.5 #

  • Fix bug where the initLanguageCode in init () function is not working

0.0.4 #

  • Add language cache (the selected language will save and load when the app is open)

0.0.3 #

  • Drop down the sdk and flutter version support

0.0.2 #

  • Provide more documents and code comments

0.0.1 #

  • First version of the package
474
likes
160
points
113k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter Localization is a package use for in-app localization with map data. More easier and faster to implement and inspired by the flutter_localizations itself.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

flutter, flutter_localizations, shared_preferences

More

Packages that depend on flutter_localization