Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

How to implement RTL in iOS using EXPO/react-native

$
0
0

I have added two localization file (arabic and english) in my react native application file names like ar.json and en.json.

My en.json file looks like

"fieldNames": {"enterEmail" : "Enter the email address"  },

My ar.json file looks like

"fieldNames": {"enterEmail" : "أدخلعنوانالبريدالإلكتروني"  },

My string/index.js file looks like below:

import * as Localization from 'expo-localization';import i18n from 'i18n-js';import en from './en.json';import ar from './ar.json';i18n.fallbacks = true;i18n.translations = { en, ar };i18n.locale = Localization.locale;export const string = value => i18n.t(value);export default i18n;

One of the file I used like the following

<Text>{string('fieldNames.enterEmail')}</Text>

Localization is working fine with both languages.

But when I choose arabic its not aligned to right side in iOS.

In my android device its working properly.This issue appear only in iOS .

Could you please help me to resolve the issue


Viewing all articles
Browse latest Browse all 16552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>