@localazy/languages
This repository contains all the ISO 639 languages supported by Localazy.
There are various forms of the content you may use.
Insallation
npm i @localazy/languages
TypeScript
Locales enum
One of the exported content is an enum file with all the locales in form of ENGLISH_LANGUAGE_NAME = "language_code", e.g. CZECH_CZECHIA = CZECH_CZECHIA = "cs_CZ"
;
import { Locales } from "@localazy/languages";
const czechia = locales.CZECH_CZECHIA;
Language resolver
Second typescript file provides following functions
import { getLocalazyLanguages } from "@localazy/languages";
console.log(getLocalazyLanguages());
import { findLocalazyLanguageByLocale } from "@localazy/languages";
console.log(findLocalazyLanguageByLocale("cs_CZ"));
The language object implements the Language type which you may import as import { Language } from "@localazy/languages";
JSON Languages overview
This repository also contains JSON overview of languages that have been translated in native language in Localazy.
If you miss some language or find inaccurate translation, we will appreciate your contribution.
You may import the languages list like this.
import { languagesList} from "@localazy/languages";