Skip to Content
0

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

Oct 24, 2017 at 11:00 AM

27

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Irfan Gokak Oct 24, 2017 at 11:54 AM
0

Hi,

You're running that app on Fiori Launchpad?

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Irfan!

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

regards,

Marvin

0

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
Former Member
Irfan Gokak

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

0
Jamie Cawley
Oct 24, 2017 at 01:28 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded