cancel
Showing results for 
Search instead for 
Did you mean: 

localize dynamic text in SAP MII

Former Member
0 Kudos
521

Hello Experts,

I am trying to create a dynamic menu in a web page in MII.

I loaded the screens the user has access to with "/XMII/Illuminator?service=admin&mode=FullProfile" and one of the attributes in the XML is the text I want to translate.

Usually I put my text between {## }, but here, as it is dynamic, I have trouble achieving the same thing. I saw that it was possible to load the bundle and the use getText() to translate the file, but I do not manage to acces the .properties fiole properly.

My property files are stored in the META-INF part under the projet folder. Any idea how to solce this ?

Thank you !

Perrine

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Perrine,

It sounds like you want to use server side localization, not client side in this case. The SAPUI5 library uses .properties files from the WEB path to localize client side text as defined in manifest.json / Component.js metadata.

It sounds like you may have a couple options here:

  1. Call /XMII/Illuminator?service=admin&mode=FullProfile from a transaction using the XML Query action block then using the localize() function from within the link editor to localize the data before it is returned to the client
  2. Feed the return of the XML to a JSP that calls the localization function so it can be returned in the needed language (may need an xsl file for this, or return the files using a Text Loader action block that reads the db:// path and is mapped to the manifest)

In our system, we have both server side (META-INF defined) and client side (manifest defined) properties files. In cases like this, we use the localize() function to handle menu items on the server before the data is passed to the client.

I hope this helps,

Eric