{"id":13724992,"url":"https://github.com/wix-incubator/locale-helpers","last_synced_at":"2025-10-07T05:02:30.908Z","repository":{"id":58767016,"uuid":"77055601","full_name":"wix-incubator/locale-helpers","owner":"wix-incubator","description":"Infers the best valid locale for a given language/country combination","archived":false,"fork":false,"pushed_at":"2023-02-22T08:52:17.000Z","size":21,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":276,"default_branch":"master","last_synced_at":"2025-04-05T15:01:52.717Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wix-incubator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2016-12-21T13:51:46.000Z","updated_at":"2023-03-13T08:53:20.000Z","dependencies_parsed_at":"2024-11-14T15:36:25.502Z","dependency_job_id":"a212d05e-f771-44c1-8e86-ecf2a1af8d3b","html_url":"https://github.com/wix-incubator/locale-helpers","commit_stats":null,"previous_names":["wix/locale-helpers"],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wix-incubator%2Flocale-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wix-incubator%2Flocale-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wix-incubator%2Flocale-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wix-incubator%2Flocale-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wix-incubator","download_url":"https://codeload.github.com/wix-incubator/locale-helpers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497802,"owners_count":21113984,"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":[],"created_at":"2024-08-03T01:02:09.103Z","updated_at":"2025-10-07T05:02:25.864Z","avatar_url":"https://github.com/wix-incubator.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# locale-helpers\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url]\n\nInfers the best valid locale for a given language/country combination.\n\nSometimes the locale is simply the language/country combination, e.g. ```en``` + ```US``` = ```en_US```.\n\nHowever, ```it``` + ```FR``` ≠ ```it_FR``` (as it is not a valid locale). A better option is the valid ```it_IT```.\n\n### Usage\nInstall the library with `npm install locale-helpers`\n\n```javascript\nvar LocaleHelpers = require('locale-helpers').LocaleHelpers;\n\nLocaleHelpers.bestLocaleFor({language: 'en', country: 'US'}); //-\u003e 'en_US'\nLocaleHelpers.bestLocaleFor({language: 'fr', country: 'FR'}); //-\u003e 'fr_FR'\nLocaleHelpers.bestLocaleFor({language: 'en', country: 'GB'}); //-\u003e 'en_GB'\nLocaleHelpers.bestLocaleFor({language: 'it', country: 'FR'}); //-\u003e 'it_IT'\n```\n\n[downloads-image]: https://img.shields.io/npm/dm/locale-helpers.svg\n\n[npm-url]: https://npmjs.org/package/locale-helpers\n[npm-image]: https://img.shields.io/npm/v/locale-helpers.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwix-incubator%2Flocale-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwix-incubator%2Flocale-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwix-incubator%2Flocale-helpers/lists"}