@launchdarkly/react-native-client-sdk
Version:
React Native LaunchDarkly SDK
11 lines • 558 B
JavaScript
var _a, _b, _c;
import { NativeModules, Platform } from 'react-native';
/**
* Ripped from:
* https://dev.to/medaimane/localization-and-internationalization-in-react-native-reaching-global-audiences-3acj
*/
const locale = Platform.OS === 'ios'
? (_b = (_a = NativeModules.SettingsManager) === null || _a === void 0 ? void 0 : _a.settings) === null || _b === void 0 ? void 0 : _b.AppleLocale // iOS
: (_c = NativeModules.I18nManager) === null || _c === void 0 ? void 0 : _c.localeIdentifier;
export default locale;
//# sourceMappingURL=locale.js.map