Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 1.11 KB

Localisation.md

File metadata and controls

37 lines (30 loc) · 1.11 KB

Localisation

The Javascript library uses a native library (ReactLocalization) to get the current interface language, then it loads and displays the strings matching the current interface locale or the default language (the first one if a match is not found) if a specific localization can't be found.

package used

Usage

import i18n from 'localisation';

To use

i18n.t('string_name')

To add new language

Go languages folder inside packages/localisation/lib You can add new file languagename.json in this format and can write your corresponding string there. Edit localisation.ts file in src folder inside packages/localisation/lib

 import languagename from "../lib/languagename.json";


  resources: {
    en: {
        translations: english,
    },
    hi: {
        translations: hindi,
    },
    ## write in below format for new langage
    // lan_type :{
        translation: language_name
    }
},