@eo-locale/detect-user-language
v1.0.0
Published
Simple and lightweight library for detect user language in browser.
Downloads
2
Readme
@eo-locale/detect-user-language
Simple and lightweight library for detect user language in browser.
How to install
yarn add @eo-locale/detect-user-language
or npm install @eo-locale/detect-user-language --save
Usage example
import { detectUserLanguage } from '@eo-locale/detect-user-language';
const availableLanguages = ['en', 'ru'];
const userLanguage = detectUserLanguage(availableLanguages);
console.log(userLanguage);