on 12-12-2014 3:21 PM
We have exposed several models via oData services and I was wondering if there was any way to dynamically translate the metadata coming back from the Label field?
For example if I add the $metadata tag to the oData call as below:
http://<server>:8000/Package/SalesQuotationHeader.xsodata/$metadata
I get the following back:
<Property Name="SAPClient" Type="Edm.String" Nullable="false" MaxLength="3" sap:aggregation-role="dimension" sap:label="SAP Client"/>
typically here I would like to recieve SAP Client back in German/French etc etc.
This can be accomplished with the following steps:
In the package you want to translate maintain the translation fields by clicking on the Translation button next to the OK under the edit dialogue (import here is collection).
Use the RTT tool that is part of the HDBClient setup and export the package eg: rtt --export -p <package> -x <directory> (replace <package> and <directory> with your particular objects.
Go to the directory and create a copy of the .xlf file for the model you want to maintain translations for and append - followed by the language code you are translating too. For example 1.model.xlf will become something like 1.model-de_DE.xlf
Inside the new xlf file add the following to the end of the file tag after source-language: target-language="de-DE"
Now for each <source></source> tag maintain another one called <target>{translation}</target>
For example:
<source>Client</source>
<target>Mandant</target>
using the rtt tool again:
rtt --import -p <package> -x <directory>
You can evaluate table "_SYS_REPO"."ACTIVE_CONTENT_TEXT_CONTENT" to see the translations.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.