Skip to Content
avatar image
Former Member

SAPUI5: Array of translatable text

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Dec 22, 2016 at 01:42 PM

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

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

    Add comment
    10|10000 characters needed characters exceeded