{"id":17797509,"url":"https://github.com/wolfadex/locale-negotiation","last_synced_at":"2025-04-02T03:21:29.694Z","repository":{"id":62419664,"uuid":"260562878","full_name":"wolfadex/locale-negotiation","owner":"wolfadex","description":"Locale negotiation, matching and selection.","archived":false,"fork":false,"pushed_at":"2020-05-01T22:34:04.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T18:15:00.222Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elm","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/wolfadex.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}},"created_at":"2020-05-01T21:35:15.000Z","updated_at":"2020-05-01T22:33:03.000Z","dependencies_parsed_at":"2022-11-01T17:00:39.212Z","dependency_job_id":null,"html_url":"https://github.com/wolfadex/locale-negotiation","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfadex%2Flocale-negotiation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfadex%2Flocale-negotiation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfadex%2Flocale-negotiation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfadex%2Flocale-negotiation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wolfadex","download_url":"https://codeload.github.com/wolfadex/locale-negotiation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246747975,"owners_count":20827243,"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-10-27T11:56:10.644Z","updated_at":"2025-04-02T03:21:29.668Z","avatar_url":"https://github.com/wolfadex.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"# locale-negotiation\n\n`locale-negotiation` helps with selecting the most optimal locale primarily for use in localization, and based off the work of [@fluent/langneg](https://github.com/projectfluent/fluent.js/tree/master/fluent-langneg).\n\n## Example usage\n\n```elm\nimport Localization.Negotiation\n\nLocalization.Negotiation.filter\n\t{ requestedLocales =  [ \"de-DE\", \"fr-FR\" ]\n\t, availableLocales = [ \"it\", \"de\", \"en-US\", \"fr-CA\", \"de-DE\", \"fr\", \"de-AU\" ]\n\t, defaultLocale = Nothing\n\t}\n-- gives you\n-- [ \"de-DE\", \"fr\" ]\n```\n\n## Liekly subtags\n\nThere's a minimal built in list of list of likely subtags data, which is useful in finding most likely available locales in case the requested locale is too generic.\n\nAn example of that scenario is when the user requests `en` locale, and the application supports `en-GB` and `en-US`.\n\n## Prior art\n\nThis package is based off the work of of [Project Fluent](https://projectfluent.org/), specifically [@fluent/langneg](https://github.com/projectfluent/fluent.js/tree/master/fluent-langneg).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolfadex%2Flocale-negotiation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwolfadex%2Flocale-negotiation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolfadex%2Flocale-negotiation/lists"}