TranslationsProvider
TranslationsProvider
is a provider component used to scope translating to the child components.
To translate the entire application, you need to add this component at the root of all components.
This allows you to set language to use and set of translated messages to be provided to the Text
components
(or Translation
components in React Native).
After adding the provider, you can use the Text
components to display translated messages as you need.
You can import the TranslationsProvider
component (and Text
component) as the followings:
#
React#
Preact#
React NativeAfter importing, you can use components in application like this:
The followings are the configuration props of TranslationsProvider
can be set: