Localization
Localization
Last updated
Was this helpful?
Localization
Last updated
Was this helpful?
Materially supports four types of international languages ('en' - English, 'fr' - French, 'ro' - Romanian, 'zh' - Chinese). You can switch language from the header bar. We internationalize the main menu for all four languages, When you change it from the header, you will see the effect there. If you want to configure one more language or set a default language then continue reading below...
React Intl uses the provider pattern to scope an i18n context to a tree of components. This allows configurations like the current locale and set of translated strings/messages to be provided at the root of a component tree and made available to the <FormattedMessage>
components.
The user's current locale and what the app should be rendered in. While defaultLocale
and defaultFormats
are for fallbacks or during development and represent the app's default. Notice how there is no, defaultMessages
that's because each provides a defaultMessage
Add node modules react-intl
emo
Data for locale files exist at src\utils\locales
Open the file config.js
and set the language.
Open file App.jsx
and apply IntlProvider