easy_localization 1.4.0+1 copy "easy_localization: ^1.4.0+1" to clipboard
easy_localization: ^1.4.0+1 copied to clipboard

outdated

Easy and Fast internationalizing and localization your Flutter Apps, this package simplify the internationalizing process using Json file.

Changelog #

[1.4.0] #

  • refactor code changed call AppLocalizations.of(context).tr() AppLocalizations.of(context).plural() to tr() and plural()

    // after 1.4.0
    Text(
      tr('switch', gender: _gender ? "female" : "male"),
    ),
    
    // before 1.4.0
    Text(
      AppLocalizations.of(context).tr('switch', gender: _gender ? "female" : "male"),
    ),
    
  • added Flutter extension for Text widget

    // after 1.4.0
    Text('switch').tr( gender: _gender ? "female" : "male"),
    Text('counter').plural(counter),
    

[1.3.5] #

  • merge gender() and tr() .

    {
      "switch":{
        "male": "Hi man ;)",
        "female": "Hello girl :)"
      }
    }
    
    new Text(
      AppLocalizations.of(context).tr('switch', gender: _gender ? "female" : "male"),
    ),
    
  • use parameters args for gender.

    {
      "switch":{
        "male": "Hi man ;) {}",
        "female": "Hello girl :) {}"
      }
    }
    
    new Text(
      AppLocalizations.of(context).tr('switch', args:["Naama"] gender: _gender ? "female" : "male"),
    ),
    

[1.3.4] #

  • adeed Gender [female,male] gender() .

    {
      "switch":{
        "male": "Hi man ;)",
        "female": "Hello girl :)"
      }
    }
    
    new Text(
      AppLocalizations.of(context).gender('switch', _gender ? "female" : "male"),
    ),
    `
    

[1.3.3+1] #

  • updated plural() thanks shushper .

    {
      "text": {
        "day": {
          "zero":"{} дней",
          "one": "{} день",
          "two": "{} дня",
          "few": "{} дня",
          "many": "{} дней",
          "other": "{} дней"
        }
      }
    }
    

[1.3.3] #

  • removed data.savedLocale .
  • optimized and clean code
  • fixed many issues

[1.3.2] #

  • plural() added property resolver for nested key translations

    {
    "text": {
      "day": {
        "zero": "day",
        "one": "day",
        "other": "days"
        }
      }
    }
    
    
    new Text(
      AppLocalizations.of(context).plural("text.day", 2),
    ),
    
  • fixed many issues

[1.3.1] #

  • add useOnlyLangCode flag

[1.3.0] #

  • Load translations from remote or backend
  • fixed many issues

[1.2.1] #

  • supported shared_preferences
  • Save selected localization

[1.2.0] #

  • Added property resolver for nested key translations
  • return translate key if the element or path not exist
{
  "title": "Hello",
  "msg": "Hello {} in the {} world ",
  "clickMe": "Click me",
  "profile": {
    "reset_password": {
      "title": "Reset Password",
      "username": "Username",
      "password": "password"
    }
  },
  "clicked": {
    "zero": "You clicked {} times!",
    "one": "You clicked {} time!",
    "other": "You clicked {} times!"
  }
}

new Text(
  AppLocalizations.of(context).tr('profile.reset_password.title'),
 ),

[1.0.4] #

  • Added Support country codes

[1.0.3] #

  • Updated tr() function added Multi Argument

[1.0.2] #

  • Added string pluralisation .
  • Added Argument to tr() function.
2961
likes
0
pub points
100%
popularity

Publisher

unverified uploader

Easy and Fast internationalizing and localization your Flutter Apps, this package simplify the internationalizing process using Json file.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, http, intl, shared_preferences

More

Packages that depend on easy_localization