Skip to content

language.setLanguage() function is not updating the language with out rerender the component ? #221

@omarabualhija

Description

@omarabualhija

i'm trying to update my language using Language.setLanguage("ar") but the language is not change

What I'm trying to do :

//return 1 for English Lang or 2 for Arabic Lang
` let selectedLang =await AsyncStoregApp.getDate(CONSTANT.AsyncStorageKey.Lang,);
if (selectedLang === 2) {
LANGUAGES.setLanguage('ar');
I18nManager.allowRTL(true);
I18nManager.forceRTL(true);
} else {
LANGUAGES.setLanguage('en');
I18nManager.allowRTL(false);
I18nManager.forceRTL(false);
}

packege.json

"dependencies": {
"@react-native-async-storage/async-storage": "^1.17.12",
"react": "18.2.0",
"react-native": "0.71.4",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions