vazco / meteor-universe-i18n

Internationalization package for Meteor with React integration.
https://atmospherejs.com/universe/i18n
MIT License
123 stars 32 forks source link

How to use translations files on react-native #186

Closed sabativi closed 8 months ago

sabativi commented 11 months ago

Hello,

I have a webapp project setup with this package, I am currently building a mobile app on react native. I want to be able to use translations files that I have defined on the webapp.

Two questions

I will be happy to contribute to a react native integration

piotrpospiech commented 11 months ago

Hi @sabativi, we will do a research if it will be possible to use Meteor React Native (@meteorrn/core) to build this package for React Native.

However, this integration have some disadvantages as it won't be possible to to keep that in the one package. We have concerns about maintainability.

I will keep you informed about the progress.

piotrpospiech commented 9 months ago

Hi, sorry for the late reply. We tested some solutions for this issue. meteor-universe-i18n will not work in the current form. The issue is this package is client and server side. The only way is to create a separate package for React Native that will handle the client side and connect to the Meteor server side of the package via @meteorrn/core.

We decided that we don't want to create integration for React Native and we want to stick to the web Meteor.

If you want to create a React Native integration, you should start with client.ts file and also some code from common.ts file (only code that is used in the client.ts). You should create an NPM package (or do it as a local service) and remove Meteor imports. Use Meteor from @meteorrn/core instead.