import * as RNLocalize from "react-native-localize";
console.log(RNLocalize.getLocales());
console.log(RNLocalize.getCurrencies());
RNLocalize.addEventListener("change", () => {
// do localization related stuff…
});
console.log(RNLocalize.getLocales());
console.log(RNLocalize.getCountry()); // "FR"
console.log(RNLocalize.getCalendar()); // -> "gregorian"
console.log(RNLocalize.findBestAvailableLanguage(["en-US", "en", "fr"]));
// -> { languageTag: "en-US", isRTL: false }
Author: shubhamd99
Source Code: https://github.com/shubhamd99/react-native-localize
#react #react-native #mobile-apps