[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-9470":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":44,"readmeContent":45,"aiSummary":46,"trendingCount":16,"starSnapshotCount":16,"syncStatus":47,"lastSyncTime":48,"discoverSource":49},9470,"easy_localization","aissat\u002Feasy_localization","aissat"," Easy and Fast internationalizing your Flutter Apps","https:\u002F\u002Fpub.dev\u002Fpackages\u002Feasy_localization",null,"Dart",1045,373,15,197,0,1,20.72,"MIT License",false,"develop",true,[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"csv","flutter","flutter-apps","globalization","i18n","i18n-alternative","internationalization","json","json-files","json-localization","locale","locale-gen","locales","locales-translation","localization","localization-kit","localization-tool","localization-using-json-files","translated-keys","translation","2026-06-12 02:02:08","[![Stand With Palestine](https:\u002F\u002Fraw.githubusercontent.com\u002FTheBSD\u002FStandWithPalestine\u002Fmain\u002Fbanner-no-action.svg)](https:\u002F\u002Fthebsd.github.io\u002FStandWithPalestine)\n\n\u003Cp align=\"center\">\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Faissat\u002Feasy_localization\u002Fdevelop\u002Flogo\u002Flogo.svg?sanitize=true\" width=\"600\"\u002F>\u003C\u002Fp>\n\u003Ch1 align=\"center\"> \nEasy and Fast internationalization for your Flutter Apps\n\u003C\u002Fh1>\n\n[![Pub Version](https:\u002F\u002Fimg.shields.io\u002Fpub\u002Fv\u002Feasy_localization?style=flat-square&logo=dart)](https:\u002F\u002Fpub.dev\u002Fpackages\u002Feasy_localization)\n[![likes](https:\u002F\u002Fbadges.bar\u002Feasy_localization\u002Flikes)](https:\u002F\u002Fpub.dev\u002Fpackages\u002Feasy_localization\u002Fscore)\n[![likes](https:\u002F\u002Fbadges.bar\u002Feasy_localization\u002Fpopularity)](https:\u002F\u002Fpub.dev\u002Fpackages\u002Feasy_localization\u002Fscore)\n[![likes](https:\u002F\u002Fbadges.bar\u002Feasy_localization\u002Fpub%20points)](https:\u002F\u002Fpub.dev\u002Fpackages\u002Feasy_localization\u002Fscore)\n![Code Climate issues](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues\u002Faissat\u002Feasy_localization?style=flat-square)\n![GitHub closed issues](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues-closed\u002Faissat\u002Feasy_localization?style=flat-square)\n![GitHub contributors](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fcontributors\u002Faissat\u002Feasy_localization?style=flat-square)\n![GitHub repo size](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Frepo-size\u002Faissat\u002Feasy_localization?style=flat-square)\n![GitHub forks](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fforks\u002Faissat\u002Feasy_localization?style=flat-square)\n![GitHub stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Faissat\u002Feasy_localization?style=flat-square)\n![Coveralls github branch](https:\u002F\u002Fimg.shields.io\u002Fcoveralls\u002Fgithub\u002Faissat\u002Feasy_localization\u002Fdev?style=flat-square)\n![GitHub Workflow Status](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fworkflow\u002Fstatus\u002Faissat\u002Feasy_localization\u002FFlutter%20Tester?longCache=true&style=flat-square&logo=github)\n![CodeFactor Grade](https:\u002F\u002Fimg.shields.io\u002Fcodefactor\u002Fgrade\u002Fgithub\u002Faissat\u002Feasy_localization?style=flat-square)\n![GitHub license](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Faissat\u002Feasy_localization?style=flat-square)\n![Sponsors](https:\u002F\u002Fimg.shields.io\u002Fopencollective\u002Fall\u002Fflutter_easy_localization?style=flat-square)\n![PRs Welcome](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPRs-welcome-brightgreen.svg?style=flat-square)\n[![StandWithPalestine](https:\u002F\u002Fraw.githubusercontent.com\u002FTheBSD\u002FStandWithPalestine\u002Fmain\u002Fbadges\u002FStandWithPalestine.svg)](https:\u002F\u002Fgithub.com\u002FTheBSD\u002FStandWithPalestine\u002Fblob\u002Fmain\u002Fdocs\u002FREADME.md)\n\n## Why easy_localization?\n\n- 🚀 Easy translations for many languages\n- 🔌 Load translations as JSON, CSV, Yaml, Xml using [Easy Localization Loader](https:\u002F\u002Fgithub.com\u002Faissat\u002Feasy_localization_loader)\n- 💾 React and persist to locale changes\n- ⚡ Supports plural, gender, nesting, RTL locales and more\n- ↩️ Fallback locale keys redirection\n- ⁉️ Error widget for missing translations\n- ❤️ Extension methods on `Text` and `BuildContext`\n- 💻 Code generation for localization files and keys.\n- 🛡️ Null safety\n- 🖨️ Customizable logger.\n\n## Getting Started\n\n### 🔩 Installation\n\nAdd to your `pubspec.yaml`:\n\n```yaml\ndependencies:\n  easy_localization: \u003Clast_version>\n```\n\nCreate folder and add translation files like this\n\n```\nassets\n└── translations\n    ├── {languageCode}.{ext}                  \u002F\u002Fonly language code\n    └── {languageCode}-{countryCode}.{ext}    \u002F\u002For full locale code\n```\n\nExample:\n\n```\nassets\n└── translations\n    ├── en.json\n    └── en-US.json \n```\n\nDeclare your assets localization directory in `pubspec.yaml`:\n\n```yaml\nflutter:\n  assets:\n    - assets\u002Ftranslations\u002F\n```\n\n\n\n### 🔌 Loading translations from other resources\n\nYou can use JSON,CSV,HTTP,XML,Yaml files, etc.\n\nSee [Easy Localization Loader](https:\u002F\u002Fgithub.com\u002Faissat\u002Feasy_localization_loader) for more info.\n\n### ⚠️ Note on **iOS**\n\nFor translation to work on **iOS** you need to add supported locales to \n`ios\u002FRunner\u002FInfo.plist` as described [here](https:\u002F\u002Fflutter.dev\u002Fdocs\u002Fdevelopment\u002Faccessibility-and-localization\u002Finternationalization#specifying-supportedlocales).\n\nExample:\n\n```xml\n\u003Ckey>CFBundleLocalizations\u003C\u002Fkey>\n\u003Carray>\n\t\u003Cstring>en\u003C\u002Fstring>\n\t\u003Cstring>nb\u003C\u002Fstring>\n\u003C\u002Farray>\n```\n\n### ⚙️ Configuration app\n\nAdd EasyLocalization widget like in example\n\n```dart\nimport 'package:flutter\u002Fmaterial.dart';\nimport 'package:flutter_localizations\u002Fflutter_localizations.dart';\nimport 'package:easy_localization\u002Feasy_localization.dart';\n\nvoid main() async {\n  WidgetsFlutterBinding.ensureInitialized();\n  await EasyLocalization.ensureInitialized();\n  \n  runApp(\n    EasyLocalization(\n      supportedLocales: [Locale('en', 'US'), Locale('de', 'DE')],\n      path: 'assets\u002Ftranslations', \u002F\u002F \u003C-- change the path of the translation files \n      fallbackLocale: Locale('en', 'US'),\n      child: MyApp()\n    ),\n  );\n}\n\nclass MyApp extends StatelessWidget {\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      localizationsDelegates: context.localizationDelegates,\n      supportedLocales: context.supportedLocales,\n      locale: context.locale,\n      home: MyHomePage()\n    );\n  }\n}\n```\n\n[**Full example**](https:\u002F\u002Fgithub.com\u002Faissat\u002Feasy_localization\u002Fblob\u002Fmaster\u002Fexample\u002Flib\u002Fmain.dart)\n\n### 📜 Easy localization widget properties\n\n| Properties              | Required | Default                   | Description                                                                                                                                                                   |\n| ----------------------- | -------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| key                     | false    |                           | Widget key.                                                                                                                                                                   |\n| child                   | true     |                           | Place for your main page widget.                                                                                                                                              |\n| supportedLocales        | true     |                           | List of supported locales.                                                                                                                                                    |\n| path                    | true     |                           | Path to your folder with localization files.                                                                                                                                  |\n| assetLoader             | false    | `RootBundleAssetLoader()` | Class loader for localization files. You can use custom loaders from [Easy Localization Loader](https:\u002F\u002Fgithub.com\u002Faissat\u002Feasy_localization_loader) or create your own class. |\n| extraAssetLoaders       | false    | null                      | A List of asset loaders, in case of needing assets being loaded from a different module or package. (e.g. adding a package that uses [Easy Localization Loader]).             |\n| fallbackLocale          | false    |                           | Returns the locale when the locale is not in the list `supportedLocales`.                                                                                                     |\n| startLocale             | false    |                           | Overrides device locale.                                                                                                                                                      |\n| saveLocale              | false    | `true`                    | Save locale in device storage.                                                                                                                                                |\n| useFallbackTranslations | false    | `false`                   | If a localization key is not found in the locale file, try to use the fallbackLocale file.                                                                                    |\n| useFallbackTranslationsForEmptyResources | false    | `false`                   | If translation is empty in the locale file, try to use the fallbackLocale file. Does not take effect if `useFallbackTranslations` is false.                  |\n| useOnlyLangCode         | false    | `false`                   | Trigger for using only language code for reading localization files.\u003C\u002Fbr>\u003C\u002Fbr>Example:\u003C\u002Fbr>`en.json \u002F\u002FuseOnlyLangCode: true`\u003C\u002Fbr>`en-US.json \u002F\u002FuseOnlyLangCode: false`        |\n| errorWidget             | false    | `FutureErrorWidget()`     | Shows a custom error widget when an error occurs.                                                                                                                             |\n\n## Usage\n\n### 🔥 Initialize library\n\nCall `EasyLocalization.ensureInitialized()` in your main before runApp.\n\n```dart\nvoid main() async{\n  \u002F\u002F ...\n  \u002F\u002F Needs to be called so that we can await for EasyLocalization.ensureInitialized();\n  WidgetsFlutterBinding.ensureInitialized();\n\n  await EasyLocalization.ensureInitialized();\n  \u002F\u002F ...\n  runApp(....)\n  \u002F\u002F ...\n}\n```\n\n### 🔥 Change or get locale\n\nEasy localization uses extension methods [BuildContext] for access to locale.\n\nIt's the easiest way change locale or get parameters 😉.\n\nℹ️ No breaking changes, you can use old the static method `EasyLocalization.of(context)`\n\nExample:\n\n```dart\ncontext.setLocale(Locale('en', 'US'));\n\nprint(context.locale.toString());\n```\n\n### 🔥 Translate `context.tr()`\n\nMain function for translate your language keys\n\nYou can use extension methods of [String] or [Text] widget, you can also use `tr()` as a static function.\n\n```dart\nText(context.tr('title'))\n```\n\nYou can also use tr() without [Context] as a static function.\n\nThis is not recommend in build methods, because the widget won't rebuild when the language changes.\n\n```dart\nText('title').tr() \u002F\u002FText widget\n\nprint('title'.tr()); \u002F\u002FString\n\nvar title = tr('title') \u002F\u002FStatic function\n```\n\n#### Arguments:\n\n| Name      | Type                  | Description                                                                         |\n| --------- | --------------------- | ----------------------------------------------------------------------------------- |\n| args      | `List\u003CString>`        | List of localized strings. Replaces `{}` left to right                              |\n| namedArgs | `Map\u003CString, String>` | Map of localized strings. Replaces the name keys `{key_name}` according to its name |\n| gender    | `String`              | Gender switcher. Changes the localized string based on gender string                |\n\nExample:\n\n``` json\n{\n   \"msg\":\"{} are written in the {} language\",\n   \"msg_named\":\"Easy localization is written in the {lang} language\",\n   \"msg_mixed\":\"{} are written in the {lang} language\",\n   \"gender\":{\n      \"male\":\"Hi man ;) {}\",\n      \"female\":\"Hello girl :) {}\",\n      \"other\":\"Hello {}\"\n   }\n}\n```\n\n```dart\n\u002F\u002F args\nText('msg').tr(args: ['Easy localization', 'Dart']),\n\n\u002F\u002F namedArgs\nText('msg_named').tr(namedArgs: {'lang': 'Dart'}),\n\n\u002F\u002F args and namedArgs\nText('msg_mixed').tr(args: ['Easy localization'], namedArgs: {'lang': 'Dart'}),\n\n\u002F\u002F gender\nText('gender').tr(gender: _gender ? \"female\" : \"male\"),\n\n```\n\n### 🔥 Plurals `plural()`\n\nYou can translate with pluralization.\nTo insert a number in the translated string, use `{}`. Number formatting supported, for more information read [NumberFormat](https:\u002F\u002Fpub.dev\u002Fdocumentation\u002Fintl\u002Flatest\u002Fintl\u002FNumberFormat-class.html) class documentation.\n\nYou can use extension methods of [String] or [Text] widget, you can also use `plural()` as a static function.\n\n#### Arguments:\n\n| Name      | Type                  | Description                                                                                                                  |\n| --------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| value     | `num`                 | Number value for pluralization                                                                                               |\n| args      | `List\u003CString>`        | List of localized strings. Replaces `{}` left to right                                                                       |\n| namedArgs | `Map\u003CString, String>` | Map of localized strings. Replaces the name keys `{key_name}` according to its name                                          |\n| name      | `String`              | Name of number value. Replaces `{$name}` to value                                                                            |\n| format    | `NumberFormat`        | Formats a numeric value using a [NumberFormat](https:\u002F\u002Fpub.dev\u002Fdocumentation\u002Fintl\u002Flatest\u002Fintl\u002FNumberFormat-class.html) class |\n\nExample:\n\n``` json\n{\n  \"day\": {\n    \"zero\":\"{} дней\",\n    \"one\": \"{} день\",\n    \"two\": \"{} дня\",\n    \"few\": \"{} дня\",\n    \"many\": \"{} дней\",\n    \"other\": \"{} дней\"\n  },\n  \"money\": {\n    \"zero\": \"You not have money\",\n    \"one\": \"You have {} dollar\",\n    \"many\": \"You have {} dollars\",\n    \"other\": \"You have {} dollars\"\n  },\n  \"money_args\": {\n    \"zero\": \"{} has no money\",\n    \"one\": \"{} has {} dollar\",\n    \"many\": \"{} has {} dollars\",\n    \"other\": \"{} has {} dollars\"\n  },\n  \"money_named_args\": {\n    \"zero\": \"{name} has no money\",\n    \"one\": \"{name} has {money} dollar\",\n    \"many\": \"{name} has {money} dollars\",\n    \"other\": \"{name} has {money} dollars\"\n  }\n}\n```\n⚠️ Key \"other\" required!\n\n```dart\n\u002F\u002FText widget with format\nText('money').plural(1000000, format: NumberFormat.compact(locale: context.locale.toString())) \u002F\u002F output: You have 1M dollars\n\n\u002F\u002FString\nprint('day'.plural(21)); \u002F\u002F output: 21 день\n\n\u002F\u002FStatic function\nvar money = plural('money', 10.23) \u002F\u002F output: You have 10.23 dollars\n\n\u002F\u002FText widget with plural BuildContext extension\nText(context.plural('money', 10.23))\n\n\u002F\u002FStatic function with arguments\nvar money = plural('money_args', 10.23, args: ['John', '10.23'])  \u002F\u002F output: John has 10.23 dollars\n\n\u002F\u002FStatic function with named arguments\nvar money = plural('money_named_args', 10.23, namedArgs: {'name': 'Jane', 'money': '10.23'})  \u002F\u002F output: Jane has 10.23 dollars\nvar money = plural('money_named_args', 10.23, namedArgs: {'name': 'Jane'}, name: 'money')  \u002F\u002F output: Jane has 10.23 dollars\n```\n\n### ⚙️ Configuring Plural Rules with `ignorePluralRules`\n\nIn some languages, pluralization is simple and only involves using zero, one, two, and other forms, without needing to handle the `few` or `many` categories.  \nBy default, `easy_localization` ignores the `few` and `many` plural forms and uses just the zero, one, two, and other forms.\n\nIf you want to enable the handling of the `few` and `many` plural categories for specific languages, you can configure the `ignorePluralRules` flag to `false` in the `EasyLocalization` initialization.\n\nHere’s how to configure it:\n\n```dart\nEasyLocalization(\n  ignorePluralRules: false, \u002F\u002F Set this line to false to enable 'few' and 'many' plural categories\n  supportedLocales: [Locale('en', 'US'), Locale('de', 'DE')],\n  path: 'assets\u002Ftranslations',\n  fallbackLocale: Locale('en', 'US'),\n  child: MyApp()\n)\n```\n\nSetting `ignorePluralRules: false` will enable the `few` and `many` plural categories, allowing your translations to handle all plural forms, including `few` and `many`, for supported languages.\n\n\n\n### 🔥 Linked translations:\n\nIf there's a translation key that will always have the same concrete text as another one you can just link to it. To link to another translation key, all you have to do is to prefix its contents with an `@:` sign followed by the full name of the translation key including the namespace you want to link to.\n\nExample:\n```json\n{\n  ...\n  \"example\": {\n    \"hello\": \"Hello\",\n    \"world\": \"World!\",\n    \"helloWorld\": \"@:example.hello @:example.world\"\n  }\n  ...\n}\n```\n\n```dart\nprint('example.helloWorld'.tr()); \u002F\u002FOutput: Hello World!\n```\n\nYou can also do nested anonymous and named arguments inside the linked messages.\n\nExample:\n\n```json\n{\n  ...\n  \"date\": \"{currentDate}.\",\n  \"dateLogging\": \"INFO: the date today is @:date\"\n  ...\n}\n```\n```dart\nprint('dateLogging'.tr(namedArguments: {'currentDate': DateTime.now().toIso8601String()})); \u002F\u002FOutput: INFO: the date today is 2020-11-27T16:40:42.657.\n```\n\n#### Formatting linked translations:\n\nFormatting linked locale messages\nIf the language distinguishes cases of character, you may need to control the case of the linked locale messages. Linked messages can be formatted with modifier `@.modifier:key`\n\nThe below modifiers are available currently.\n\n- `upper`: Uppercase all characters in the linked message.\n- `lower`: Lowercase all characters in the linked message.\n- `capitalize`: Capitalize the first character in the linked message.\n\nExample:\n\n```json\n{\n  ...\n  \"example\": {\n    \"fullName\": \"Full Name\",\n    \"emptyNameError\": \"Please fill in your @.lower:example.fullName\"\n  }\n  ...\n}\n```\n\nOutput:\n\n```dart\nprint('example.emptyNameError'.tr()); \u002F\u002FOutput: Please fill in your full name\n```\n\n### 🔥 Linked files:\n\nYou can split translations for a single locale into multiple files by using linked files. This helps keep your JSON clean and maintainable.\n\nTo link an external file, set the key’s value to a path prefixed with `:\u002F`, relative to your translations directory. For example, with default path `assets\u002Ftranslations` and locale `en-US`:\n\n```json\n{\n  \"errors\": \":\u002Ferrors.json\",\n  \"validation\": \":\u002Fvalidation.json\",\n  \"notifications\": \":\u002Fnotifications.json\"\n}\n```\n\nAt runtime, Easy Localization will load:\n```\nassets\n└── translations\n    └── en-US\n        ├── errors.json \n        ├── validation.json  \n        └── notifications.json  \n```\n\nEach linked file must contain a valid object of translation keys (of the file type you are using [Other file types](#-loading-translations-from-other-resources)).  \n\nDon't forget to add your linked files (or linked files folder, here assets\u002Ftranslations\u002Fen-US\u002F), to your pubspec.yaml : [See installation](#-installation).\n\n### 🔥 Reset locale `resetLocale()`\n\nReset locale to device locale\n\nExample:\n\n```dart\nRaisedButton(\n  onPressed: (){\n    context.resetLocale();\n  },\n  child: Text(LocaleKeys.reset_locale).tr(),\n)\n```\n\n### 🔥 Get device locale `deviceLocale`\n\nGet device locale\n\nExample:\n\n```dart\nprint(context.deviceLocale.toString()) \u002F\u002F OUTPUT: en_US\n```\n\n### 🔥 Delete save locale `deleteSaveLocale()`\n\nClears a saved locale from device storage\n\nExample:\n\n```dart\nRaisedButton(\n  onPressed: (){\n    context.deleteSaveLocale();\n  },\n  child: Text(LocaleKeys.reset_locale).tr(),\n)\n```\n\n### 🔥 Get Easy localization widget properties\n\nAt any time, you can take the main [properties](#-easy-localization-widget-properties) of the Easy localization widget using [BuildContext].\n\nAre supported: supportedLocales, fallbackLocale, localizationDelegates.\n\nExample:\n\n```dart\nprint(context.supportedLocales); \u002F\u002F output: [en_US, ar_DZ, de_DE, ru_RU]\n\nprint(context.fallbackLocale); \u002F\u002F output: en_US\n```\n\n## 💻 Code generation\n\nCode generation supports only json files, for more information run in terminal `flutter pub run easy_localization:generate -h`\n\n### Command line arguments\n\n| Arguments                    | Short | Default               | Description                                                                 |\n| ---------------------------- | ----- | --------------------- | --------------------------------------------------------------------------- |\n| --help                       | -h    |                       | Help info                                                                   |\n| --source-dir                 | -S    | resources\u002Flangs       | Folder containing localization files                                        |\n| --source-file                | -s    | First file            | File to use for localization                                                |\n| --output-dir                 | -O    | lib\u002Fgenerated         | Output folder stores for the generated file                                 |\n| --output-file                | -o    | codegen_loader.g.dart | Output file name                                                            |\n| --format                     | -f    | json                  | Support json or keys formats                                                |\n| --[no-]skip-unnecessary-keys | -u    | false                 | Ignores keys defining nested object except for pluarl(), gender() keywords. |\n\n### 🔌 Localization asset loader class\n\nSteps:\n\n1. Open your terminal in the folder's path containing your project\n2. Run in terminal `flutter pub run easy_localization:generate`\n3. Change asset loader and past import.\n\n  ```dart\n  import 'generated\u002Fcodegen_loader.g.dart';\n  ...\n  void main(){\n    runApp(EasyLocalization(\n      child: MyApp(),\n      supportedLocales: [Locale('en', 'US'), Locale('ar', 'DZ')],\n      path: 'resources\u002Flangs',\n      assetLoader: CodegenLoader()\n    ));\n  }\n  ...\n  ```\n  \n4. All done!\n\n### 📦 Localization support for multi module\u002Fpackage project\n\nIf you want to add localization support from other modules and packages you can add them via `extraAssetLoaders` parameter:\n\n```dart\n  void main(){\n    runApp(EasyLocalization(\n      child: MyApp(),\n      supportedLocales: [Locale('en', 'US'), Locale('ar', 'DZ')],\n      path: 'resources\u002Flangs',\n      assetLoader: CodegenLoader()\n      extraAssetLoaders: [\n        TranslationsLoader(packageName: 'package_example_1'),\n        TranslationsLoader(packageName: 'package_example_2'),\n      ],\n    ));\n  }\n```\n\n### 🔑 Localization keys\n\nIf you have many localization keys and are confused, key generation will help you. The code editor will automatically prompt keys\n\nSteps:\n1. Open your terminal in the folder's path containing your project \n2. Run in terminal `flutter pub run easy_localization:generate -f keys -o locale_keys.g.dart`\n3. Past import.\n\n```dart\nimport 'generated\u002Flocale_keys.g.dart';\n```\n4. All done!\n\nHow to use generated keys:\n\n```dart\nprint(LocaleKeys.title.tr()); \u002F\u002FString\n\u002F\u002For\nText(LocaleKeys.title).tr(); \u002F\u002FWidget\n```\n\n### ✅ Audit missing keys\n\nIf you prefer to not generate keys you can see an audit of your translation keys to see the one present in your app code but not in your translations file by running the audit command.\n\n```\nflutter pub run easy_localization:audit\n```\n\nIf you are not using the default translations folder path (assets\u002Ftranslations) or the lib folder for your code you can specify your custom paths : \n\n| Arguments                    | Short | Default               | Description                                                                 |\n| ---------------------------- | ----- | --------------------- | --------------------------------------------------------------------------- |\n| --translations-dir           | -t    | assets\u002Ftranslations   | Folder containing localization files                                        |\n| --source-dir                 | -s    | lib                   | Folder containing the app code files                                        |\n\n## 🖨️ Logger\n\n[Easy Localization] logger based on [Easy Logger]\n\nYou can customize logger for you project\n\n### Show only lost keys message\n\nLost translations keys logged like warning messages. Change [Easy Logger] level for display only errors and warnings.\n\n```dart\nEasyLocalization.logger.enableLevels = [LevelMessages.error, LevelMessages.warning];\n```\n\n### Logger off\n\nFor disable logger, change Build Modes in [Easy Logger] to empty List;\n\n```dart\nEasyLocalization.logger.enableBuildModes = [];\n```\n\n### Catching logger messages\n\nFor catching logger messages you need override default printer function.\n\n```dart\nEasyLogPrinter customLogPrinter = (\n  Object object, {\n  String name,\n  StackTrace stackTrace,\n  LevelMessages level,\n}) {\n  \u002F\u002F\u002FYour function\n  print('$name: ${object.toString()}');\n};\n\n\u002F\u002F\u002F override printer to custom\nEasyLocalization.logger.printer = customLogPrinter;\n```\n\nRead more about [Easy Logger](https:\u002F\u002Fgithub.com\u002Faissat\u002Feasy_localization\u002Fblob\u002Fmaster\u002Fpackages\u002Feasy_logger\u002FREADME.md)\n\n## ➕ Extensions helpers\n\n### String to locale\n\n```dart\n'en_US'.toLocale(); \u002F\u002F Locale('en', 'US')\n\n\u002F\u002Fwith custom separator\n'en|US'.toLocale(separator: '|') \u002F\u002F Locale('en', 'US')\n```\n### Locale to String with separator\n\n```dart\nLocale('en', 'US').toStringWithSeparator(separator: '|') \u002F\u002F en|US\n```\n\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fgitpod.io\u002F#https:\u002F\u002Fgithub.com\u002Faissat\u002Feasy_localization\" target=\"_blank\">\n        \u003Cimg src=\"https:\u002F\u002Fgitpod.io\u002Fbutton\u002Fopen-in-gitpod.svg\" width=200 \u002F>\n    \u003C\u002Fa>\n\u003C\u002Fp>\n\n\n## Screenshots\n\n| Arabic RTL                                                                                                                  | English LTR                                                                                                                   | Error widget                                                                                                                     |\n| --------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |\n| ![Arabic RTL](https:\u002F\u002Fraw.githubusercontent.com\u002Faissat\u002Feasy_localization\u002Fmaster\u002Fscreenshots\u002FScreenshot_ar.png \"Arabic RTL\") | ![English LTR](https:\u002F\u002Fraw.githubusercontent.com\u002Faissat\u002Feasy_localization\u002Fmaster\u002Fscreenshots\u002FScreenshot_en.png \"English LTR\") | ![Error widget](https:\u002F\u002Fraw.githubusercontent.com\u002Faissat\u002Feasy_localization\u002Fmaster\u002Fscreenshots\u002FScreenshot_err.png \"Error widget\") |\n\n## Donations\n\nWe need your support. Projects like this can not be successful without support from the community. If you find this project useful, and would like to support further development and ongoing maintenance, please consider donating.\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fopencollective.com\u002Fflutter_easy_localization\u002Fdonate\" target=\"_blank\">\n    \u003Cimg src=\"https:\u002F\u002Fopencollective.com\u002Fflutter_easy_localization\u002Fdonate\u002Fbutton@2x.png?color=blue\" width=300 \u002F>\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n### Sponsors\n\n\u003Cimg src=\"https:\u002F\u002Fopencollective.com\u002Fflutter_easy_localization\u002Ftiers\u002Fbacker.svg?avatarHeight=48\"\u002F>\n\n\n### Contributors thanks\n\n![contributors](https:\u002F\u002Fcontributors-img.firebaseapp.com\u002Fimage?repo=aissat\u002Feasy_localization)\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Faissat\u002Feasy_localization\u002Fgraphs\u002Fcontributors\">\u003C\u002Fa>\n","easy_localization 是一个用于快速国际化 Flutter 应用的库。它支持通过 JSON、CSV 等格式加载多语言翻译，并提供了丰富的功能，如响应和持久化语言更改、支持复数、性别、嵌套以及 RTL 语言环境等。此外，该库还具备错误处理机制（针对缺失翻译）、`Text` 和 `BuildContext` 的扩展方法以及代码生成能力来帮助开发者高效地管理本地化文件与键值。非常适合需要为全球用户群体提供多语言版本的应用场景使用。",2,"2026-06-11 03:23:01","top_language"]