Created
November 14, 2019 13:18
-
-
Save theodesp/cfbb83848fc9c00496fa3a0ac47d0576 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 React, {Component} from "react"; | |
import intl from 'react-intl-universal'; | |
// common locale data | |
require('intl/locale-data/jsonp/el.js'); | |
export default class App extends Component { | |
state = {initDone: false}; | |
componentDidMount() { | |
this.loadLocales(); | |
} | |
loadLocales() { | |
intl.init({ | |
currentLocale: i18nConfig.locale, | |
locales, | |
}) | |
.then(() => { | |
// After loading CLDR locale data, start to render | |
this.setState({initDone: true}); | |
}); | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment