cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5: Array of translatable text

Former Member
0 Kudos

I have a drop-down menu item on the screen that allows a user to select his/her nationality from a list of countries loaded from a JSON file. It works fine, however, the text will need to be translatable. I could either have a set of different JSON country list files for the country names, each translated into a particular language, or I could have the translated country names list sent as an array from the Gateway.

Before I explore the latter, I was wondering whether it might be possible to use an array inside the resource bundle files, loop over that in some way, and feed that into the drop down menu. This way the country list will for part of the i18n Resource Bundle.

Accepted Solutions (0)

Answers (1)

Answers (1)

junwu
Active Contributor
0 Kudos

you can put them in json file, then load it.

{"EN":["US","CN"],"CH":["美国","中国"]}