@lingui/detect-locale
Detects the user's locale from the URL, a cookie, storage, the browser settings or the HTML lang attribute
@lingui/detect-locale is part of Lingui. Lingui is a lightweight, open-source internationalization (i18n) library for JavaScript and TypeScript. It brings compile-time macros and a CLI for message extraction to React, React Native, Vue, SolidJS, Astro, Svelte, and Node.js.
The package has no dependency on the rest of Lingui and works with any i18n library.
Usage
See the locale detection reference.
License
This package is licensed under the MIT license.