@sujalchoudhari/localization
v1.0.3
Published
Simple Localization tool for React with multiple languages and easy selection
Downloads
2
Readme
localization
Simple Localization tool for React with multiple languages and easy selection
Install
npm install --save @sujalchoudhari/localization@latest
Usage
// main.tsx
import {LocalizationProvider, useLocalization} from '@sujalchoudhari/localization'
<LocalizationProvider>
<App />
</LocalizationProvider>
// Using Translatons
import Translate from '@sujalchoudhari/localization'
<Translate> Hello ~ नमस्ते ~ नमस्कार </Translate>
// <Translate> 0 ~ 1 ~ 2 ~ ... ~ n </Translate>
// Changing Localization
import {useLocalization} from '@sujalchoudhari/localization'
const {currentLanguage,changeLanguage} = useLocalization()
changeLanguage(1)
License
MIT © SujalChoudhari