{"id":13551327,"url":"https://github.com/aissat/easy_localization","last_synced_at":"2025-05-14T01:10:56.966Z","repository":{"id":38419902,"uuid":"162816156","full_name":"aissat/easy_localization","owner":"aissat","description":" Easy and Fast internationalizing your Flutter Apps","archived":false,"fork":false,"pushed_at":"2025-01-26T21:05:49.000Z","size":3337,"stargazers_count":980,"open_issues_count":208,"forks_count":351,"subscribers_count":17,"default_branch":"develop","last_synced_at":"2025-05-10T10:31:55.040Z","etag":null,"topics":["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"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/easy_localization","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aissat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://www.buymeacoffee.com/aissat"],"ko_fi":"aissat","open_collective":"flutter_easy_localization"}},"created_at":"2018-12-22T14:03:59.000Z","updated_at":"2025-05-05T00:53:59.000Z","dependencies_parsed_at":"2024-01-01T04:13:26.118Z","dependency_job_id":"2c6739d2-f2df-4464-b2dd-fd15c0beeda0","html_url":"https://github.com/aissat/easy_localization","commit_stats":{"total_commits":697,"total_committers":48,"mean_commits":"14.520833333333334","dds":0.5667144906743184,"last_synced_commit":"e5d0f7025797acae9cc478bb693cb774daef385f"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aissat%2Feasy_localization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aissat%2Feasy_localization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aissat%2Feasy_localization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aissat%2Feasy_localization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aissat","download_url":"https://codeload.github.com/aissat/easy_localization/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254049316,"owners_count":22006036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["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"],"created_at":"2024-08-01T12:01:46.259Z","updated_at":"2025-05-14T01:10:56.929Z","avatar_url":"https://github.com/aissat.png","language":"Dart","funding_links":["https://www.buymeacoffee.com/aissat","https://ko-fi.com/aissat","https://opencollective.com/flutter_easy_localization","https://opencollective.com/flutter_easy_localization/donate"],"categories":["Dart","Multiplatform Apps (Search Results)"],"sub_categories":[],"readme":"[![Stand With Palestine](https://raw.githubusercontent.com/TheBSD/StandWithPalestine/main/banner-no-action.svg)](https://thebsd.github.io/StandWithPalestine)\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/aissat/easy_localization/develop/logo/logo.svg?sanitize=true\" width=\"600\"/\u003e\u003c/p\u003e\n\u003ch1 align=\"center\"\u003e \nEasy and Fast internationalization for your Flutter Apps\n\u003c/h1\u003e\n\n[![Pub Version](https://img.shields.io/pub/v/easy_localization?style=flat-square\u0026logo=dart)](https://pub.dev/packages/easy_localization)\n[![likes](https://badges.bar/easy_localization/likes)](https://pub.dev/packages/easy_localization/score)\n[![likes](https://badges.bar/easy_localization/popularity)](https://pub.dev/packages/easy_localization/score)\n[![likes](https://badges.bar/easy_localization/pub%20points)](https://pub.dev/packages/easy_localization/score)\n![Code Climate issues](https://img.shields.io/github/issues/aissat/easy_localization?style=flat-square)\n![GitHub closed issues](https://img.shields.io/github/issues-closed/aissat/easy_localization?style=flat-square)\n![GitHub contributors](https://img.shields.io/github/contributors/aissat/easy_localization?style=flat-square)\n![GitHub repo size](https://img.shields.io/github/repo-size/aissat/easy_localization?style=flat-square)\n![GitHub forks](https://img.shields.io/github/forks/aissat/easy_localization?style=flat-square)\n![GitHub stars](https://img.shields.io/github/stars/aissat/easy_localization?style=flat-square)\n![Coveralls github branch](https://img.shields.io/coveralls/github/aissat/easy_localization/dev?style=flat-square)\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/aissat/easy_localization/Flutter%20Tester?longCache=true\u0026style=flat-square\u0026logo=github)\n![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/aissat/easy_localization?style=flat-square)\n![GitHub license](https://img.shields.io/github/license/aissat/easy_localization?style=flat-square)\n![Sponsors](https://img.shields.io/opencollective/all/flutter_easy_localization?style=flat-square)\n![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)\n[![StandWithPalestine](https://raw.githubusercontent.com/TheBSD/StandWithPalestine/main/badges/StandWithPalestine.svg)](https://github.com/TheBSD/StandWithPalestine/blob/main/docs/README.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://github.com/aissat/easy_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\u003e\n```\n\nCreate folder and add translation files like this\n\n```\nassets\n└── translations\n    ├── {languageCode}.{ext}                  //only language code\n    └── {languageCode}-{countryCode}.{ext}    //or 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/translations/\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://github.com/aissat/easy_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/Runner/Info.plist` as described [here](https://flutter.dev/docs/development/accessibility-and-localization/internationalization#specifying-supportedlocales).\n\nExample:\n\n```xml\n\u003ckey\u003eCFBundleLocalizations\u003c/key\u003e\n\u003carray\u003e\n\t\u003cstring\u003een\u003c/string\u003e\n\t\u003cstring\u003enb\u003c/string\u003e\n\u003c/array\u003e\n```\n\n### ⚙️ Configuration app\n\nAdd EasyLocalization widget like in example\n\n```dart\nimport 'package:flutter/material.dart';\nimport 'package:flutter_localizations/flutter_localizations.dart';\nimport 'package:easy_localization/easy_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/translations', // \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://github.com/aissat/easy_localization/blob/master/example/lib/main.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://github.com/aissat/easy_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/br\u003e\u003c/br\u003eExample:\u003c/br\u003e`en.json //useOnlyLangCode: true`\u003c/br\u003e`en-US.json //useOnlyLangCode: 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  // ...\n  // Needs to be called so that we can await for EasyLocalization.ensureInitialized();\n  WidgetsFlutterBinding.ensureInitialized();\n\n  await EasyLocalization.ensureInitialized();\n  // ...\n  runApp(....)\n  // ...\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() //Text widget\n\nprint('title'.tr()); //String\n\nvar title = tr('title') //Static function\n```\n\n#### Arguments:\n\n| Name      | Type                  | Description                                                                         |\n| --------- | --------------------- | ----------------------------------------------------------------------------------- |\n| args      | `List\u003cString\u003e`        | List of localized strings. Replaces `{}` left to right                              |\n| namedArgs | `Map\u003cString, String\u003e` | 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// args\nText('msg').tr(args: ['Easy localization', 'Dart']),\n\n// namedArgs\nText('msg_named').tr(namedArgs: {'lang': 'Dart'}),\n\n// args and namedArgs\nText('msg_mixed').tr(args: ['Easy localization'], namedArgs: {'lang': 'Dart'}),\n\n// 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://pub.dev/documentation/intl/latest/intl/NumberFormat-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\u003e`        | List of localized strings. Replaces `{}` left to right                                                                       |\n| namedArgs | `Map\u003cString, String\u003e` | 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://pub.dev/documentation/intl/latest/intl/NumberFormat-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//Text widget with format\nText('money').plural(1000000, format: NumberFormat.compact(locale: context.locale.toString())) // output: You have 1M dollars\n\n//String\nprint('day'.plural(21)); // output: 21 день\n\n//Static function\nvar money = plural('money', 10.23) // output: You have 10.23 dollars\n\n//Text widget with plural BuildContext extension\nText(context.plural('money', 10.23))\n\n//Static function with arguments\nvar money = plural('money_args', 10.23, args: ['John', '10.23'])  // output: John has 10.23 dollars\n\n//Static function with named arguments\nvar money = plural('money_named_args', 10.23, namedArgs: {'name': 'Jane', 'money': '10.23'})  // output: Jane has 10.23 dollars\nvar money = plural('money_named_args', 10.23, namedArgs: {'name': 'Jane'}, name: 'money')  // 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, // Set this line to false to enable 'few' and 'many' plural categories\n  supportedLocales: [Locale('en', 'US'), Locale('de', 'DE')],\n  path: 'assets/translations',\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()); //Output: 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()})); //Output: 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()); //Output: Please fill in your full name\n```\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()) // 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); // output: [en_US, ar_DZ, de_DE, ru_RU]\n\nprint(context.fallbackLocale); // 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/langs       | Folder containing localization files                                        |\n| --source-file                | -s    | First file            | File to use for localization                                                |\n| --output-dir                 | -O    | lib/generated         | 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/codegen_loader.g.dart';\n  ...\n  void main(){\n    runApp(EasyLocalization(\n      child: MyApp(),\n      supportedLocales: [Locale('en', 'US'), Locale('ar', 'DZ')],\n      path: 'resources/langs',\n      assetLoader: CodegenLoader()\n    ));\n  }\n  ...\n  ```\n  \n4. All done!\n\n### 📦 Localization support for multi module/package 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/langs',\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/locale_keys.g.dart';\n```\n4. All done!\n\nHow to use generated keys:\n\n```dart\nprint(LocaleKeys.title.tr()); //String\n//or\nText(LocaleKeys.title).tr(); //Widget\n```\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  ///Your function\n  print('$name: ${object.toString()}');\n};\n\n/// override printer to custom\nEasyLocalization.logger.printer = customLogPrinter;\n```\n\nRead more about [Easy Logger](https://github.com/aissat/easy_localization/blob/master/packages/easy_logger/README.md)\n\n## ➕ Extensions helpers\n\n### String to locale\n\n```dart\n'en_US'.toLocale(); // Locale('en', 'US')\n\n//with custom separator\n'en|US'.toLocale(separator: '|') // Locale('en', 'US')\n```\n### Locale to String with separator\n\n```dart\nLocale('en', 'US').toStringWithSeparator(separator: '|') // en|US\n```\n\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://gitpod.io/#https://github.com/aissat/easy_localization\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://gitpod.io/button/open-in-gitpod.svg\" width=200 /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\n## Screenshots\n\n| Arabic RTL                                                                                                                  | English LTR                                                                                                                   | Error widget                                                                                                                     |\n| --------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |\n| ![Arabic RTL](https://raw.githubusercontent.com/aissat/easy_localization/master/screenshots/Screenshot_ar.png \"Arabic RTL\") | ![English LTR](https://raw.githubusercontent.com/aissat/easy_localization/master/screenshots/Screenshot_en.png \"English LTR\") | ![Error widget](https://raw.githubusercontent.com/aissat/easy_localization/master/screenshots/Screenshot_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\"\u003e\n  \u003ca href=\"https://opencollective.com/flutter_easy_localization/donate\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://opencollective.com/flutter_easy_localization/donate/button@2x.png?color=blue\" width=300 /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n### Sponsors\n\n\u003cimg src=\"https://opencollective.com/flutter_easy_localization/tiers/backer.svg?avatarHeight=48\"/\u003e\n\n\n### Contributors thanks\n\n![contributors](https://contributors-img.firebaseapp.com/image?repo=aissat/easy_localization)\n\u003ca href=\"https://github.com/aissat/easy_localization/graphs/contributors\"\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faissat%2Feasy_localization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faissat%2Feasy_localization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faissat%2Feasy_localization/lists"}