uphold/react-native-locale-detector

Name: react-native-locale-detector

Owner: Uphold

Description: Detects the locale of a user's phone.

Forked from: DylanVann/react-native-locale-detector

Created: 2018-01-19 17:54:53.0

Updated: 2018-01-19 17:54:54.0

Pushed: 2018-01-22 15:20:58.0

Homepage: null

Size: 9

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

react-native-locale-detector

Detects the locale of a user's phone. Based on react-native-i18n, but this just exports the device's locale. This isn't particularly useful on it's own and you'll probably want to use it with an i18n library like i18next.

Installation
install react-native-locale-detector --save
t-native link
Usage
mport the locale.
rt locale from 'react-native-locale-detector'

e could log it. Maybe it's en-US...
ole.log(locale)

r if you're using a localization library.
LocalizationLibrary.setLocale(locale)

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.