trylang-react
v0.0.5
Published
Easy manage your localization
Downloads
3
Readme
Trylang js package
Import trylang
npm i trylang
yarn add trylang
Init trylang
let lang = await trylang(PROJECT CDN URL);
Usage
lang(KEY, VALUES , LANG)
Examples
lang.defaultLang('EN') //* EN
lang.defaultLang() //* EN
lang.listLangs() //* [ 'EN', 'DE', 'IT', 'ES', 'TR' ]
lang('CLOSE') //* close
lang('CLOSE',"TR") //* kapat
lang('WELCOME', { 0 : "Kaan" } ) //* Welcome Kaan
lang('HELLO', { name : "Kaan" } ) //* Hello Kaan
lang('HELLO', { name : "Kaan" }, "TR" ) //* Merhaba Kaan