@uxland/uxl-localization
v4.0.3
Published
UXLand - Localization
Downloads
9
Readme
UXL Localization
| Build Status | Statements | Branches | Functions | Lines | | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | ----------------------------------------- | ------------------------------------------- | ----------------------------------- | | | | | | |
Installation
npm i @uxland/uxl-localization
usage
const locales = ca: {
[moduleName]: {}
},
en: {
[moduleName]: {}
},
es: {
[moduleName]: {
key: 'Esto es la cadena'
}
}
props.localize(`${moduleName}.key`)
With arguments
const locales = ca: {
[moduleName]: {}
},
en: {
[moduleName]: {}
},
es: {
[moduleName]: {
order: 'Pedido con id {id}'
}
}
props.localize(`${moduleName}.key`, 'id', '12345');