Skip to content
🌎 i18next third-party language detector for CLI
TypeScript JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows
examples
src
.eslintignore
.eslintrc.json
.gitignore
.prettierignore
.prettierrc.json
LICENSE
README.md
jest.config.js
package.json
tsconfig.json
yarn.lock

README.md

i18next-cli-language-detector

npm ci codecov

i18next third-party language detector for CLI.

screenshot

> See examples

Installation

yarn add i18next i18next-cli-language-detector

Usage

Add .use(I18nextCLILanguageDetector) to your initialization part of i18next as following:

import i18next from 'i18next';
import I18nextCLILanguageDetector from 'i18next-cli-language-detector';

i18next
  .use(I18nextCLILanguageDetector)
  .init();

Supported environment variables

i18next-cli-language-detector refers following variables to determine which language to activate.

  • LC_ALL
  • LC_MESSAGES
  • LANG
  • LANGUAGE

As for the format of these variables, see documentation of Gettext.

Related projects

License

MIT

You can’t perform that action at this time.