Expand my Community achievements bar.

SOLVED

react i18 translation not working at adobe runtime io

Avatar

Level 1

My project is built on aem react spa with ssr and for translation i used npm package "i18next" and this works well client side and also working when ssr is done by express by reinitializing i18next at server side . But when i use adobe runtime io for ssr it does not return translated texts in the content , how can i handle this.

if i18 works on client side then initially label load from ssr and then when react bundle loads on client then all labels change as per i18. it is not.a good user experience.
i want i18 to work along with server side rendering. so that ssr output comes as per i18 translations only.

I am able ot make it work when I do SSR using express . Cant make it work when I do ssr using adobe IO runtime .

reference - i18 documentation for ssr (https://react.i18next.com/legacy-v9/serverside-rendering)

ssr with adobe I/O  ==> https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/dev...

Does Adobe I/O uses express inside it ? if yes then how can we manipulate that 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi, 

Adobe I/O runtime has already pre-installed express, so you can use it in your action to achieve what you need. Please see here: https://developer.adobe.com/runtime/docs/guides/reference/runtimes/ 

Hope this helps



Esteban Bustamante

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi, 

Adobe I/O runtime has already pre-installed express, so you can use it in your action to achieve what you need. Please see here: https://developer.adobe.com/runtime/docs/guides/reference/runtimes/ 

Hope this helps



Esteban Bustamante

Avatar

Administrator

@NishantGa Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni