Skip to content

MShokry/react-native-change-ios-locale

Repository files navigation

react-native-change-ios-locale

Force ios to change the language for the native module

Installation

npm install react-native-change-ios-locale

Usage

import { switchLang } from "react-native-change-ios-locale";

// ...
useEffect(() => {
    async function changeLocalization() {
      await translations.setLanguage(selectedLocale);
    }
    if (selectedLocale) {
      changeLocalization().then(() => {
        if (Platform.OS === 'ios') {
          switchLang(selectedLocale);
        }
      });
    }
  }, [selectedLocale]);

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published