Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update expo-localization for SDK43 #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import I18n from './vendor/i18n';
import * as Localization from 'expo-localization'
import { getLocales } from 'expo-localization';

I18n.initAsync = async () => {
const locale = await Localization.locale;
I18n.locale = (locale) ? locale.replace(/_/, '-') : '';
}
const locale = getLocales();
I18n.locale = locale ? locale.replace(/_/, '-') : '';
};

export default I18n;
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ex-react-native-i18n",
"version": "0.0.6",
"version": "0.0.8",
"description": "Exponentisation of => React Native and I18n.js integration",
"main": "index.js",
"types": "index.d.ts",
Expand All @@ -20,7 +20,7 @@
"author": "Xavier Carpentier <[email protected]>",
"license": "MIT",
"dependencies": {
"expo-localization": "^5.0.1"
"expo-localization": "~15.0.3"
},
"devDependencies": {},
"peerDependencies": {
Expand Down
11 changes: 11 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,14 @@
# yarn lockfile v1


expo-localization@^11.0.0:
version "11.0.0"
resolved "https://registry.yarnpkg.com/expo-localization/-/expo-localization-11.0.0.tgz#ae384c59ae708a4b2e7ff7dfead1d9ee9c06b482"
integrity sha512-LLK7+pYScM5ob8/IsnCb4JVQb6AvWP5anTIikaZmpz7XCUJ0KHaCPY8YfUjVSSwWspSMLxpqKEZtAra+bHxYZA==
dependencies:
rtl-detect "^1.0.2"

rtl-detect@^1.0.2:
version "1.0.4"
resolved "https://registry.yarnpkg.com/rtl-detect/-/rtl-detect-1.0.4.tgz#40ae0ea7302a150b96bc75af7d749607392ecac6"
integrity sha512-EBR4I2VDSSYr7PkBmFy04uhycIpDKp+21p/jARYXlCSjQksTBQcJ0HFUPOO79EPPH5JS6VAhiIQbycf0O3JAxQ==