cancel
Showing results for 
Search instead for 
Did you mean: 

What is the right approach for a client side json model which supports multiple languages?

0 Kudos

Hello everyone,

I'm currently working on a SAPUI5 application which is holding its application data in client side json files (just like in the SAP Fiori webshop reference application).Now I plan to support different languages for the data in this json file. So what am i supposed to do on a best practice perspective?

Do I have to make a separate json file for each language? If yes, how do I load the right json file according to the current language?

Is this the point where I have to use a database instead of a json model?

In general: What is the right approach for this purpose?

I hope my question is comprehensible and could be answered. Thank you in advance!

regards,

Marvin

Accepted Solutions (0)

Answers (2)

Answers (2)

jamie_cawley
Advisor
Advisor
0 Kudos

If the data is for labels for the app, then you should use the i18n framework of UI5. If it is actually app data, then you should use a database and service to provide the data in different languages.

Regards,

Jamie

irfan_gokak
Contributor
0 Kudos

Hi,

You're running that app on Fiori Launchpad?

0 Kudos

Hi Irfan!

No, currently not, my plan is to build a standalone webapp. What's the matter? Does it make a difference?

regards,

Marvin

irfan_gokak
Contributor
0 Kudos

No, but if your running on Fiori Launchpad then you can get current language from url parameters. That is why i asked.

So in webapp how you are changing language?

0 Kudos

You can switch the language of your Browser and that should do the trick.