{"id":26457177,"url":"https://github.com/terran-source/flutter-applocale","last_synced_at":"2026-05-08T09:34:35.374Z","repository":{"id":44736248,"uuid":"248951642","full_name":"Terran-Source/flutter-applocale","owner":"Terran-Source","description":"A Flutter plugin to enable support for internationalization (i18n) or different language with json files","archived":false,"fork":false,"pushed_at":"2022-01-27T20:19:45.000Z","size":1180,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-11T10:39:15.204Z","etag":null,"topics":["dart","flutter","flutter-plugin","i18n","internationalization","language-support","localization"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/applocale","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/Terran-Source.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-21T10:18:48.000Z","updated_at":"2023-11-04T15:00:41.000Z","dependencies_parsed_at":"2022-08-26T02:42:08.242Z","dependency_job_id":null,"html_url":"https://github.com/Terran-Source/flutter-applocale","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/Terran-Source/flutter-applocale","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terran-Source%2Fflutter-applocale","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terran-Source%2Fflutter-applocale/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terran-Source%2Fflutter-applocale/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terran-Source%2Fflutter-applocale/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Terran-Source","download_url":"https://codeload.github.com/Terran-Source/flutter-applocale/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terran-Source%2Fflutter-applocale/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32775050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dart","flutter","flutter-plugin","i18n","internationalization","language-support","localization"],"created_at":"2025-03-18T22:43:33.419Z","updated_at":"2026-05-08T09:34:35.352Z","avatar_url":"https://github.com/Terran-Source.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# applocale\nA Flutter plugin to enable support for internationalization (i18n) or different language with json files.\n\n## Usage\n\nA simple usage example:\n\n### Project Structure\n![project_structure](doc/img/project_structure.png)\n\n#### lang.json contents\n```json\n//en.json\n{\n  \"title\": \"Awesome!\",\n  \"hello\": \"Hello\",\n  \"message\": \"This is English!!!\",\n  \"subDetail\": {\n    \"greeting\": \"{hello} {name}!!!\",\n    \"runtimeText\": \"I have proof, you can replace {replacement}\"\n  }\n}\n\n//bn.json\n{\n  \"title\": \"অভূতপূর্ব!\",\n  \"hello\": \"নমস্কার\",\n  \"message\": \"ইহা বাংলা!!!\",\n  \"subDetail\": {\n    \"runtimeText\": \"আমি জানি যে {replacement}কে যে কোনও দিন চলে যেতে হবে।\"\n  }\n}\n```\n\n#### Add the language directory as assets in pubspec.yaml\n```yaml\n# pubspec.yaml\n# add dependencies\ndependencies:\n  applocale: \u003clatest-version\u003e\n\nflutter:\n  # add the whole directory containing language json files as an asset\n  assets:\n    - i18n/\n\n```\n\n#### Now the code\n```dart\n// main.dart\nimport 'package:flutter/material.dart';\n\nimport 'package:applocale/applocale.dart';\nimport 'package:flutter_localizations/flutter_localizations.dart';\n\n// define supported Language lists\nMap\u003cString, String\u003e get _supportedLanguages =\u003e {\n      \"en\": \"English\",\n      \"en_us\": \"English(USA)\",\n      \"bn\": \"Bengali\",\n    };\nString get _defaultLanguage =\u003e \"en\";\nList\u003cString\u003e get _getSupportedLanguages =\u003e\n    _supportedLanguages.entries.map((l) =\u003e l.key).toList();\n\nvoid main(List\u003cString\u003e args) =\u003e runApp(FlutterDemoApp());\n\nclass FlutterDemoApp extends StatefulWidget {\n  @override\n  _FlutterDemoApp createState() =\u003e _FlutterDemoApp();\n}\n\nclass _FlutterDemoApp extends State\u003cFlutterDemoApp\u003e {\n  // initialize _localeDelegate\n  LocaleDelegate _localeDelegate = LocaleDelegate.init(\n    _getSupportedLanguages,\n    // * optional, if it's same as the first one in the supportedLanguages\n    defaultLanguage: _defaultLanguage,\n  );\n\n  @override\n  void initState() {\n    super.initState();\n  }\n\n  @override\n  Widget build(BuildContext context) =\u003e MaterialApp(\n        supportedLocales: _localeDelegate.supportedLocales, // Step I\n        localizationsDelegates: [\n          _localeDelegate, // Step II\n          GlobalMaterialLocalizations.delegate,\n          GlobalWidgetsLocalizations.delegate\n        ],\n        title: 'Flutter Demo',\n        home: FlutterDemo(),\n      );\n}\n\nclass FlutterDemo extends StatelessWidget {\n  @override\n  Widget build(BuildContext context) {\n    // since LocaleDelegate is already initialized \u0026 ready\n    var appLocale = AppLocale.of(context); // Step III\n    // In case some additional values can be set now. This is an one time\n    // activity\n    appLocale.updateValue({'name': 'জয়ন্তী'});\n\n    return Scaffold(\n      appBar: AppBar(\n        title: Text(appLocale.localValue('title')),\n      ),\n      body: ListView(\n        children: \u003cWidget\u003e[\n          Center(\n            child: Text(appLocale.localValue('subDetail.greeting')),\n          ),\n          Center(\n            child: Text(appLocale.localValue(\n              'subDetail.runtimeText',\n              {'replacement': 'Individual'}, // runtime interpolation\n            )),\n          ),\n          Center(\n            child: Text(appLocale.localValue('message')),\n          ),\n        ],\n      ),\n    );\n  }\n}\n```\n\n### Project Structure\n![App with English](doc/img/app_en.png)![Change system language](doc/img/app_lang.png)![App with Bengali](doc/img/app_bn.png)\n\n*App with English*  \u003e *Change system language* \u003e *App with Bengali*\n\n![App with English](doc/img/live_example.gif)\n\n## Features and bugs\n\nPlease file feature requests and bugs at the [issue tracker][tracker].\n\n[tracker]: https://github.com/Terran-Source/applocale/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterran-source%2Fflutter-applocale","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterran-source%2Fflutter-applocale","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterran-source%2Fflutter-applocale/lists"}