Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Translate dynamic data into multiple language in react native

I have developed my app using react native,I need to translate my entire app into user chosen language.

I know translation of the static content.but i need it for dynamic content. I want to convert the data which is coming from back end API also.So I can't maintain so many j son files related to different languages.

I have already seen below link react-native google translater

for static this is working fine https://www.npmjs.com/package/react-native-i18n

for dynamic i have seen below two npm's which is having installation errors and having issues and not under the maintenance https://www.npmjs.com/package/google-translate-api

https://github.com/react-native-community/react-native-languages

is there any other solution for this?

like image 544
nomula Avatar asked Dec 01 '25 03:12

nomula


1 Answers

sir for fast translation of static and dynamic data. you can create one component where you can pass all strings (text) in your app, And use '@aws-sdk/client translate for translation, it's speedy and also works on dynamic data

https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-translate/index.html

https://www.npmjs.com/package/@aws-sdk/client-translate

like image 137
Krushna Naghate Avatar answered Dec 03 '25 10:12

Krushna Naghate



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!