Example of Localization in React Native Multi Language App

Example of Localization in React Native Multi Language App

Here is an Example of Localization in React Native Multi Language App. Localization is the process of making something local in character or restricting it to a particular place. In case of application development, it is related to the development of the application according to the local language.

For the localization, we are going to use LocalizedStrings component from react-native-localization library.

How to Use

Here is the code snippet of LocalizedStrings we have used in this Example.

In this example below, we will make a home screen to select the language and will show the text content on the next screen accordingly from a common string repository where we have defined same text for each language code.

To Make a React Native App

Getting started with React Native will help you to know more about the way you can make a React Native project. We are going to use react-native init to make our React Native App. Assuming that you have node installed, you can use npm to install the react-native-cli command line utility. Open the terminal and go to the workspace and run
npm install -g react-native-cli
Run the following commands to create a new React Native project
react-native init ProjectName
This will make a project structure with an index file named App.js in your project directory.

Installation of Dependencies

To use LocalizedStrings we need to install react-native-localization dependency and to switch between different screens we are going to use react-native-navigation dependency.

To install these dependencies open the terminal and jump into your project

Run the following command to install react-native-localization

Run the following command to install react-native-navigation

For the new React Navigation 3.+, you also have to install the react-native-gesture-handler using the following command

This command will copy all the dependencies into your node_module directory.

Linking of Dependencies

After the installation of dependencies, you need to link it with your project using

This is an automatic process to link the libraries with the project. If you have any issue or you want to install it manually you can see the process of manual linking of react-native-localization and manual linking of react-native-gesture-handler.

Here we have done with our installation of the dependencies. If you are facing any issue then please comment below so that we can help you out from the problem. Now let’s move towards the code.

You can download the source code from Github


Follow the steps below

We are using the following project structure. So please make the following project structure and replace the code.





To Run the React Native App

Open the terminal again and jump into your project using.
cd ProjectName
To run the project on an Android Virtual Device or on real debugging device
react-native run-android
or on the iOS Simulator by running
react-native run-ios (macOS only).





This is how you can make a multi-language React Native Application (Localization). If you have any doubt or you want to share something about the topic you can comment below or contact us here. There will be more posts coming soon. Stay tuned!

Hope you liked it. 🙂

How useful was this post?

Click on a star to rate us!

Average rating / 5. Vote count:

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

1 thought on “Example of Localization in React Native Multi Language App”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

About React will use the information you provide on this form to be in touch with you and to provide updates and marketing.