on 03-26-2008 1:34 PM
I'm calling an RFC module, one of the parameters' type is a user-defined data element. Its value range is defined as
Fixed value | Short text
1 | Text1
2 | Text2
3 | Text3
When I choose Goto->Translation, I can see all of these texts are translated.
Now, I'm using following Java Web Dynpro code to get text on the screen:
ISimpleValueSet values =
wdContext.nodeP().getNodeInfo().getAttribute("D").getSimpleType().getSVS
ervices().getValues();
for (int j = 0; j < values.size(); j++) {
if (someShort.compareTo((Short) values.getKey(j)) == 0)
storeString = values.getText(j);
}
Now, the original language the type is defined in is English, the portal language is set to French. I use this code several times for different values of someShort, and for some I get the translated text, while for others, I get the original. Any ideas what might be the problem?
Can you explain it more detail, when you dont get correct translations.
Use the below code to get the text from the enumeration.
IWDAttributeInfo contextElementAttributeInfo = wdContext.getNodeInfo().getAttribute(IPrivateTextView.IContextElement.TEST_ELE);
ISimpleTypeModifiable sim = contextElementAttributeInfo.getModifiableSimpleType();
IModifiableSimpleValueSet labelValues = sim.getSVServices().getModifiableSimpleValueSet();
labelValues.getText(key) - will retun text for the key from enumeration.
labelValues - will contain your enumeration types.
Regards,
Sridhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, that's equivalent to my code. I want to display all the possible values' texts on the screen. To keep it simple:
Text1
Text2
Text3
Text4
Text5
Text5
I just use the getText(i) method you suggested, and the result is something like:
Text1 (in French)
Text2 (in French)
Text3 (in French)
Text4 (in English)
Text5 (in Dutch)
Text5 (in Dutch)
Are you sure, you got this weird out put.
I never saw any thing like that, half in one language and others in different language.
Did you create simple type XXXXX.dtsimpletype_fr.xlf
Source Language : French
With these setting you should get everything in french? How abt other languages...like spanish.
Do you get same weird results?
Regards,
Sridhar
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.