git-point icon indicating copy to clipboard operation
git-point copied to clipboard

Get rid of react-native-i18n

Open machour opened this issue 7 years ago • 2 comments

Once #777 is merged, react-native-i18n will become almost unused.

The only two things it's used for will be:

  • Retrieve the current locale (functionality provided by react-native-device-info)
  • Lookup translations strings (easily doable in t()

Getting rid of it would mean having 100% control about how our translations are handled in our code.

Opinions?

machour avatar Apr 23 '18 09:04 machour

I'm also migrating from react-native-i18n to js-lingui. So far so good, albeit I use the i18n.t more than <Trans> components and it took me a while to set everything up (https://github.com/lingui/js-lingui/issues/176). Good luck.

vonovak avatar Apr 27 '18 07:04 vonovak

@vonovak Good choice, it's an awesome lib! Actually there was a first PR to migrate to js-lingui as well (#747), but since it was too much to handle, we went for an intermediary home-made version to ease up the final migration :)

machour avatar Apr 27 '18 11:04 machour