stefalda / ReactNativeLocalization

Class to localize the ReactNative interface
MIT License
899 stars 124 forks source link

Language doesn't change on navigator items or headers unless by changing device language #162

Closed AliKHaliliT closed 5 years ago

AliKHaliliT commented 5 years ago

Hi, I have used this library to translate my app. I have two languages, Arabic and English. I have created a settings page which handles the manual language selection. Everything works fine in the body of the screens. The problem is that translations doesn't take affect in navigator headers or Items as they do in the contents of the screens themselves. But when I change the device language everything gets translated as they should, not only the screens themselves but all of the headers, items and etc. I want to change the language for all of the contents of the app without changing the device language. Has anyone experienced this behavior? If anyone knows how to fix this, please help.

AliKHaliliT commented 5 years ago

I found a way to fix this behavior, for more details check out this link: https://stackoverflow.com/questions/57088829/how-to-change-the-navigationoption-title-of-a-drawernavigator-dynamically