Skip to content

Repository files navigation

Fronto Localize

Basic Localization utility

// /path/to/component_name/locale.jsimportlocalizefrom'fronto-localize';consten={blah: "Blah"};constth={blah: "บลา"}exportdefaultlocalize({ en, th });

Then in your component file.

// /path/to/component_name/index.jsimporttfrom'./locale'classComponentNameextendsReact.PureComponent{// ...render(){<div>{t('blah')}</div>}}

By default it will look for the localStorage.getItem('locale') if that doesn't exist it defaults to en, however you can specify one like so t('blah', 'th')

About

Localization module for react apps

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages