cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the Dynamic Text Language using xlf files

former_member214651
Active Contributor
0 Kudos

Hi All,

I have developed a WDJ application and successfully Internationalized it using .xlf file approach supporting 3 Languages other than English.

All the static text which are on screen were translated, But my application contains some UI elements (Button text, Text View) which displays text dynamically based on the operation performed. The necessary text are loaded thru WD code on action of the other UI elements.

Is there a way to achieve Internationalize such Dynamic text using xlf files? If not, please let me know the other options of changing the language for the Dynamic texts.

In the Message Pool, I have messages in the Format

"Please Enter {0}"

where *

  • will be substituted by the field name. Since this is also done in the coding of WD application, only the Please Enter is getting converted and
text also should be changed based on the Language selected.

Please provide me with your inputs.

Regards,

Poojith MV

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member214651
Active Contributor
0 Kudos

Thanks a lot!!!!!!!

former_member192152
Active Participant
0 Kudos

For improve your job try this: [Web Dynpro Translator|http://sourceforge.net/projects/xlfmergeengine/]

regards,

Angelo

Former Member
0 Kudos

Where is the variable part (0) coming from?

Walter

Former Member
0 Kudos

Where is the variable part (0) coming from?

Walter

former_member214651
Active Contributor
0 Kudos

Hi,

The is coming from ny WD code. The format "Please select " where is replaced by the field name in my WD code using reportContextAttribute():

messageManager.reportContextAttributeMessage(<attributePointerObject>,<messagepoolobject>,new Object[]{"Variant ID"});
Here is replaced by "Variant ID"

Regards,

Poojith MV

Former Member
0 Kudos

OK, I understand what you are attempting. I think an easier approach (and simpler for the translators) would be to provide the complete sentences to be translated.

e.g.,

  • Please enter date.

  • Please enter time.

If there is a reason you cannot do this, please provide more specific information.

Regards,

Walter

Former Member
0 Kudos

Hi,

Create key - value pair in MessageManager and set transalate to true. For the same key put the language specific texts in your xlf files.

You can get the messages from the message manager during the runtime.

http://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/progmodel/api/WDMessage.html

Best Wishes

Idhaya R

former_member214651
Active Contributor
0 Kudos

Hi,

Thanks for the reply. Are u telling that instead of using the option, use the complete sentence of the message? In that case it would really be too many statements to be entered in the messagepool as there are many validations....

Please let me know if there is any other options.

Regards,

Poojith MV

Former Member
0 Kudos

Yes, this is what I am suggesting.

The alternative is to use the field name (or some other unique identifier) as a key for retrieving the locale-specific text from a back-end Java class using a resource bundle.

From my point of view, providing the full texts up front seems an easier way to go.

Regards,

Walter