0.1.5 • Published 6 years ago

react-native-locale-utils v0.1.5

Weekly downloads
14
License
ISC
Repository
github
Last release
6 years ago

react-native-locale-utils

npm version

Locale utilities for React Native

Install

npm install --save react-native-locale-utils

Automatically link

add the following line to your Podfile:

pod 'LocaleUtils', :path => '../node_modules/react-native-locale-utils'

Manually link

With React Native 0.27+

react-native link react-native-locale-utils

With older versions of React Native

You need rnpm (npm install -g rnpm)

rnpm link react-native-locale-utils

Usage

import LocaleUtils from 'react-native-locale-utils';
NameMethodReturnNotes
24 Hour formatis24HourFormat()BooleanReturns if system time settings uses 12 hour or 24 hour system
Metric SystemusesMetricSystem()BooleanReturns if system locale uses metric system or not
Device Country CodedeviceCountry()StringReturns the two letter country code for the system