Created
May 29, 2019 12:45
-
-
Save theodesp/6516938f3ebdb1238efc61d929f97391 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {LocaleProvider} from './localeProvider.mjs'; | |
... | |
const locale = new LocaleProvider(detectLocale()); | |
locale.onChangeLocale((tag)=> console.log('Locale Changed to', tag)); | |
console.log('Detected user locale is', detectLocale()); | |
locale.setCurrent('el'); | |
console.log('Current user locale is', locale.getCurrent()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment