{"id":20597369,"url":"https://github.com/rk0cc/intl_script_recognizer","last_synced_at":"2025-10-25T05:18:54.133Z","repository":{"id":163328190,"uuid":"638828791","full_name":"rk0cc/intl_script_recognizer","owner":"rk0cc","description":"Flutter to Intl locale resolver","archived":false,"fork":false,"pushed_at":"2023-06-11T14:16:42.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-17T16:45:22.795Z","etag":null,"topics":["date-format","dateformat","flutter","intl","locale","locales","localization","script"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rk0cc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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":{"github":"rk0cc"}},"created_at":"2023-05-10T07:39:00.000Z","updated_at":"2023-05-23T11:42:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"f75ed9ed-85f5-425f-80c2-25b4a49969c3","html_url":"https://github.com/rk0cc/intl_script_recognizer","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/rk0cc/intl_script_recognizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rk0cc%2Fintl_script_recognizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rk0cc%2Fintl_script_recognizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rk0cc%2Fintl_script_recognizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rk0cc%2Fintl_script_recognizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rk0cc","download_url":"https://codeload.github.com/rk0cc/intl_script_recognizer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rk0cc%2Fintl_script_recognizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280906433,"owners_count":26411415,"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","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["date-format","dateformat","flutter","intl","locale","locales","localization","script"],"created_at":"2024-11-16T08:22:09.690Z","updated_at":"2025-10-25T05:18:54.099Z","avatar_url":"https://github.com/rk0cc.png","language":"Dart","readme":"# An adapter helps `intl` package recognize correct language when `Locale` specified script language\n\n---\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pub.dev/packages/intl_script_recognizer\"\u003e\u003cimg src=\"https://img.shields.io/pub/v/intl_script_recognizer?color=%2333FF33\u0026label=Latest%20version%3A\u0026style=flat-square\" alt=\"Pub version\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/sponsors/rk0cc\"\u003e\u003cimg alt=\"GitHub Sponsors\" src=\"https://img.shields.io/github/sponsors/rk0cc?color=%2333FF33\u0026style=flat-square\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/rk0cc/intl_script_recognizer/actions/workflows/flutter_test.yml\"\u003e\u003cimg alt=\"Unit test\" src=\"https://github.com/rk0cc/intl_script_recognizer/actions/workflows/flutter_test.yml/badge.svg?branch=main\u0026event=push\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nThe pattern of locale for [intl package](https://pub.dev/packages/intl) is `(language)_(COUNTRY)` only.\nHowever, Flutter's [Locale](https://api.flutter.dev/flutter/dart-ui/Locale-class.html) format is\n`(language)_(Script)_(COUNTRY)` which triggered fallback to `(language)` only. Therefore, this package\naims to handle correct language system by define country code with corresponded scripting.\n\n## Get started\n\n### Before start\n\nThe future release in major version number of this package will depend on the latest major version of Dart and Flutter SDK.\nIt may rewrite new syntax to satisify use case which no longer compatable for older release one.\n\n**To avoid this issue, you may required to run `flutter upgrade` before install it.**\n\n### Install\n\nInstall `intl` and this package by using command:\n\n```bash\nflutter pub add intl intl_script_recognizer\n```\n\nor modify `dependencies` in `pubspec.yaml` directly:\n\n```yaml\n# pubspec.yaml\ndepencencies:\n    intl: any\n    intl_script_recognizer: ^2.2.0\n```\n\nThen, import dependencies into your project:\n\n```dart\nimport 'package:intl/intl.dart';\nimport 'package:intl_script_recognizer/base.dart';\n```\n\nIf `DateFormat` is required, it is highly recommended to import date format extension package:\n\n```dart\nimport 'package:intl_script_recognizer/date_format.dart';\n```\n\nBy default, `IntlScriptRecognizer` will recognized \"Traditional Chinese\" (`zh_Hant`) to \"Chinese (Taiwan)\" (`zh_TW`) once the\ninstance has been created. If you preferred to uses another country or region's varient (in this case, Hong Kong), it is possible\nto override assigned record by activating `replaceExisted` like [example](https://github.com/rk0cc/intl_script_recognizer/blob/main/example/main.dart).\n\n## License\n\nBSD-3\n","funding_links":["https://github.com/sponsors/rk0cc"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frk0cc%2Fintl_script_recognizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frk0cc%2Fintl_script_recognizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frk0cc%2Fintl_script_recognizer/lists"}