I want two more thing in Expo! localizations and console.log object

Hi. I love React Native and love your works.

I have two suggestions with your work.

  1. I want Expo to include localizations to handle multiple languages which is very important in app development.

  2. Expo client app won’t show any console if I put console.log with object. Such as “console.log(props)”. I want this to appear like a chrome.

I hope your project work forever!! Love it.

1 Like

Hi!

1.) You can npm install i18n-js from GitHub - everydayhero/i18n-js: It's a small library to provide the I18n translations on the Javascript. and then work along the README.md from GitHub - fnando/i18n-js: It's a small library to provide the I18n translations on the Javascript. It comes with Rails support. .

2.) For logging complex objects, you need to enable javascript debugging, like explained here: https://docs.expo.io/versions/v17.0.0/guides/debugging.html

Cheers,
Marcus

1 Like

Thanks for reply.

I hope i18n-js is in part of Expo.

Also can you provide me usage expample of using GitHub - fnando/i18n-js: It's a small library to provide the I18n translations on the Javascript. It comes with Rails support. library?

We also provide Expo.Util.getCurrentLocaleAsync() to figure out which is the user’s preferred locale on their device. See the docs for this method (sorry it’s a bit hard to discover).

i18n support · Issue #10 · expo/expo · GitHub has a link to this example: https://github.com/locize/locize-examples/tree/master/react-native-expo

I read the documents you commented before I wrote the question.

What I expected was seeing object console like provided in chrome as you can see from above image. When I do debug JS remotely, application gets really slow. Hope I can debug only using expo tool debugging.

Thanks.!

We’re working on making console.log(...) between the Expo client and XDE/exp more robust and support many more data types like React components, for example. It’s still in progress and I don’t know when it will be released but just want you to know we are thinking about it.

In the meantime, you could do your own custom object serialization yourself, like console.log(yourFunction(...)).

Thanks. I just wanted to know if expo team is working on it.

Hi ide, any progress in implementing localization in Expo ? Will it come in future ?
Thanks

Is this still an issue? You can use https://github.com/i18next/react-i18next/ with expo → there is even a sample: https://github.com/i18next/react-i18next/tree/master/example/react-native-expo (using Expo.Util.getCurrentLocaleAsync for language detection)