1. Home
  2. Docs
  3. Documentation
  4. Translations & RTL
  5. Adding New Strings

Adding New Strings

As mentioned before, all the new strings that you add while customizing the app must appear in all the translations files. Otherwise, they will always be displayed in English.

1. Use IMLocalized method for all strings in the app

IMLocalized is a method that allows us to support multi languages in all of our React Native apps. This means that instead of using plain strings in the source code, we wrap them around a IMLocalized call.
For example, instead of adding a text like this

<Text>Random text here</Text>

You’ll be adding it like this

<Text>{IMLocalized("Random text here")}</Text>

IMLocalized can be found in src/Core/localization/IMLocalization.js.

2. Add the translations of the new string in all translations file

After adding a new string, you need to provide the correct translations in all the supported languages for that string. To do this, simply update all the .json files from src/Translations folder, by adding the string as a key and the translation as the value.

For example, adding the Arabic translation for the “Random string here” will look like this:

rtl react native

Was this article helpful to you? Yes No

How can we help?