{"id":13455149,"url":"https://github.com/sindresorhus/os-locale","last_synced_at":"2025-05-15T15:07:39.854Z","repository":{"id":28784756,"uuid":"32307472","full_name":"sindresorhus/os-locale","owner":"sindresorhus","description":"Get the system locale","archived":false,"fork":false,"pushed_at":"2021-12-23T14:01:07.000Z","size":55,"stargazers_count":228,"open_issues_count":2,"forks_count":41,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-05-12T23:36:37.415Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/sindresorhus.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":".github/security.md","support":null},"funding":{"github":"sindresorhus","open_collective":"sindresorhus","custom":"https://sindresorhus.com/donate"}},"created_at":"2015-03-16T07:09:09.000Z","updated_at":"2025-05-08T01:37:31.000Z","dependencies_parsed_at":"2022-08-25T21:11:05.587Z","dependency_job_id":null,"html_url":"https://github.com/sindresorhus/os-locale","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fos-locale","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fos-locale/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fos-locale/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fos-locale/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindresorhus","download_url":"https://codeload.github.com/sindresorhus/os-locale/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254305632,"owners_count":22048677,"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-07-31T08:01:01.781Z","updated_at":"2025-05-15T15:07:39.697Z","avatar_url":"https://github.com/sindresorhus.png","language":"JavaScript","funding_links":["https://github.com/sponsors/sindresorhus","https://opencollective.com/sindresorhus","https://sindresorhus.com/donate","https://tidelift.com/subscription/pkg/npm-os-locale?utm_source=npm-os-locale\u0026utm_medium=referral\u0026utm_campaign=enterprise\u0026utm_term=repo"],"categories":["Packages","JavaScript","包","Uncategorized","Miscellaneous","Number"],"sub_categories":["Miscellaneous","其他","Uncategorized","杂项"],"readme":"# os-locale\n\n\u003e Get the system [locale](https://en.wikipedia.org/wiki/Locale_(computer_software))\n\nUseful for localizing your module or app.\n\nPOSIX systems: The returned locale refers to the [`LC_MESSAGE`](http://www.gnu.org/software/libc/manual/html_node/Locale-Categories.html#Locale-Categories) category, suitable for selecting the language used in the user interface for message translation.\n\n## Install\n\n```\n$ npm install os-locale\n```\n\n## Usage\n\n```js\nimport {osLocale} from 'os-locale';\n\nconsole.log(await osLocale());\n//=\u003e 'en-US'\n```\n## API\n\n### osLocale(options?)\n\nReturns a `Promise` for the locale.\n\n### osLocaleSync(options?)\n\nReturns the locale.\n\n#### options\n\nType: `object`\n\n##### spawn\n\nType: `boolean`\\\nDefault: `true`\n\nSet to `false` to avoid spawning subprocesses and instead only resolve the locale from environment variables.\n\n## os-locale for enterprise\n\nAvailable as part of the Tidelift Subscription.\n\nThe maintainers of os-locale and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-os-locale?utm_source=npm-os-locale\u0026utm_medium=referral\u0026utm_campaign=enterprise\u0026utm_term=repo)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fos-locale","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindresorhus%2Fos-locale","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fos-locale/lists"}