-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
Rename the project to react-native-localize #29
Conversation
…e-languages into 4.0.0
…e-languages into 4.0.0
@zoontek Is there any reason why the Podspec was removed? |
@danilobuerger It is not removed, but moved in the /ios folder. Some users had a hard time mixing |
Ah thanks @zoontek ! |
For anyone interested in mocking it with jest... I've got it working as
|
`react-native-languages` was renamed to `react-native-localize` (zoontek/react-native-localize#29)
which folder did you use? |
Hello everyone,
This project started from a PR I made to the
react-native
to polyfill browsernavigator.languages
andnavigator.language
.Original PR: facebook/react-native#14568
MDN docs: https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage
But recently, as this lib got more users, some of you expressed some difficulties about handling serious app localization: loading the proper translation (using deviceLocale and fallback to "en" when translation is not available isn't what the user expect), detecting RTL layout need, but also currencies, date format, etc.
For this multiples reasons and because the current name doesn't reflect the new possibilities of this lib, I chose to rename this package to
react-native-localize
.Update should be smooth. If you follow the previous example:
Unlink (with
react-native unlink react-native-languages
) and uninstallreact-native-languages
, then install and linkreact-native-localize
.More complex and performant examples are available in the
/example
folder (to avoid loading all your translations in memory or even load translations from the file system - not from our JS bundle)It's also the occasion to switch to getters functions. "Constants" updated at runtime was a weird choice driven by the current
NavigatorLanguage
API.New API offers:
Which should simplify your l20n needs.
Feel free to make any feedback.