UNPKG

react-native-get-device-locale

Version:

react-native-get-device-locale is a lightweight and efficient React Native module that provides easy access to the device's locale.

9 lines (6 loc) 260 B
import type { TurboModule } from 'react-native'; import { TurboModuleRegistry } from 'react-native'; export interface Spec extends TurboModule { getDeviceLocale(): Promise<string>; } export default TurboModuleRegistry.getEnforcing<Spec>('GetDeviceLocale');