cancel
Showing results for 
Search instead for 
Did you mean: 

Show adobe form in different languages

Former Member
0 Kudos

Hi all,

I have a Web Dynpro Application which holds an Interactive Form. This form is translated into several languages.

Is there any way to indicate the WDA application which language has to use to open the Adobe Form?

The user would have the option to choose the language first.

I know we can do this by changing the whole WDA application language, but I do not like this because I want to keep application in user language.

Thank you very much.

Nacho.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi again,

is there any way to do this? Even if it is not standard?

Any help would be appreciated.

Thank you very much,

Nacho

chintan_virani
Active Contributor
0 Kudos

I have not tried this at my end but see if it gives you some direction.

For Eg: I am assuming you have a WD application and a form embedded in it with Two fields say TextField1 and DateTimeField1

1. Instead of using Default Locale, choose Viewers System Locale for the top level subform. This will ensure the data is displayed as per the locale of the user.

This will only give the values as per Viewer locale, however the Caption still will show as default one. To dynamically change the caption as per the langauge ie. it should be Date in English and Datei German follow below steps.

2. Goto Tools -> Options -> Data Binding -> Enable the Show Dynamic Properties checkbox. This will ensure that the Caption property of the form fields can be binded to a context.

3. Provide a drop-down in your WD application outside the form and maintain list of all texts.

4. Create the necessary contexts such as TextFieldCaption, DateTimeFieldCaption in your WD and now set the values accordingly.

Here is pseudo code in JAVA, you can write the same in ABAP in WD


if(drop-down value == "EN")
{
  wdContext.currentContextElement.setTextFieldCaption("Hello");
  wdContext.currentContextElement.setDateTimeFieldCaption("Date");
}
else if (drop-down value == "DE")
{
  wdContext.currentContextElement.setTextFieldCaption("Hello1");
  wdContext.currentContextElement.setDateTimeFieldCaption("Datei");

}

4. Bind the caption property of the Fields the the WD contexts.

Now when you select the language hopefully you should be able to get the desired output.

Chintan

Former Member
0 Kudos

Thank you Chintan for your helpful answer.

As there is no standard solution for this situation, I have created a context node TEXTS with a group of STRINGS which refer to each label and text in the Adobe Form that I need to translate.

In the Adobe Form I have binded all texts with each one of these STRINGS.

Before showing the form to the end user, I read all OTR texts in selected language and fill attributes of context node TEXTS.

I am still looking for a suitable solution about form locale properties (i.e.: date format) but it's not that important for my project. Your proposed solution is ok but I do not need to show the form in viewer's locale but in selected language locale.

Thanks again,

Nacho.

chintan_virani
Active Contributor
0 Kudos

Well you can definitely set the Adobe form locale. For all the locale codes, goto ALD help and search for Locale.

So now when you select the langauge, create an additional context for locale and set its value as per codes mentioned in the help.

Drag this context onto your Adobe form and keep it invisble. In form:ready event of the subform check its value and set the form locale as mentioned below


DateTimeField1.locale = TextField3.rawValue; // TextField3 is binded to Locale context set in WD

// If you want set complete form locale use as below
form1.locale = TextField3.rawValue

Chintan

Former Member
0 Kudos

Thank you very much Chintan!

I did not think about that!

Best regards,

Nacho

Answers (0)