cancel
Showing results for 
Search instead for 
Did you mean: 

Internationalization not working with WDResourceHandler - IMPORTANT

Former Member
0 Kudos

Hi,

I have developed a Web Dynpro application. The requirement was to internationalize this application so that the UI Elements/Messages etc come in diff languages. The language required are Japanese, Chinese,French & Malay along with English.

Now i followed these links:

http://help.sap.com/saphelp_nw04/helpdata/en/44/f0674039c6c549e10000000a1550b0/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/e0/65f378cbc80d4390ea9283b7094dd6/frameset.htm

I tried changing the .xlf files. But here are the problems i am facing:

1) For translation, which the Web Dynpro does, it uses the WDResourceHandler. I have found that if i am having two iViews on this same Web Dynpro(which is my requirement to have multiple iViews on single web dynpro), and one is forced in Japanese & other Chinese, then whichever iView loads first , the second web dynpro iView takes the first web dynrpo iView locale. This means that the WDResourceHandler's locale gets cached. This is a serious problem. Since if u have a look at the standard UI element of TableView, the word "Line 1 of 1" also does not gets changed dynamically if the locale is changed. You have to logoff to see the changed locale. Any help on this will be appreciated....

2) In the S2X editor, i am not able to type/paste in Japanese & chinese. i am using NWDS 2.0.9, Does any body knows how to use the editor for these languages.

3) Malay Language is not available in the languages dropdown of S2X editor. Does anybody knows how to get Malay.

Though a long list of problem, but these problems have become serious now for our aplication bcos of the failure of WDResourceHandler. Any kind of help and suggestion would be rewarded and appreciated.

Regards

Gaurav Gandhi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Gaurav

Generally when a webdynpro application runs, It takes the default locale of the browser. I guess you will not be able to display content in 2 different languges on the same page.

Regards

NagaKishore V

Former Member
0 Kudos

Hi NagaKishore,

Thanks for the reply. This is what i have found during my application build. But this is bad. I am now really stuck due to this limitation.

We can use portal to show web dynpro and in portal you can change the portal language and everything gets reflected and changed dynamically but this is not applicable with web dynpro bcos the WDResourceHandler does not picks it up dynamically.

If you or any body else can provide any other clue or any workaround for this, i will really be happy..

Hope to see some workarounds...

Regards

Gaurav Gandhi

Answers (2)

Answers (2)

guru_subramanianb
Active Contributor
0 Kudos

Hi Gandhi,

did you put the property file in the package structure of your project.Are you also reading it from the property file which will be a key-value pair like a HashMap.

Also are you using java.util.resourcebundle for the same.

Refer these blogs by my colleague which will definitely help you.

/people/perumal.kanthan/blog/2005/05/26/application-internationalization-in-sap-webas-using-java-resource-bundlepart-ii

/people/perumal.kanthan/blog/2005/06/09/application-internationalization-in-sap-web-as-using-java-resource-bundle-part-iii

Regards,

Guru

Former Member
0 Kudos

Hi Guru,

Thanx for the link of PART-III link. I had already read the Part-I & Part-II when it was released (i didnt knew when this guy released PART-III?).

Actually why i was stressing on the .xlf way is because it is mentioend (and even i tried) that it is very simple abd i dont have to do any coding. Just keep on making .xlf files and that will work automatically.

But now i am so much frustrated with this appraoch, am now planning to do full fledged coding and use the resource bundles and develop langauge based UI.

I will now definately look at these and try to solve my problem. If i face some problem on this i will let u know.

Regards

Gaurav Gandhi

guru_subramanianb
Active Contributor
0 Kudos

hi,

you have to do the following steps :-

• Internationalization is used for adapting already existing Webdynpros application

Without changing the source code so that they can be used in several multi lingual languages.

• Here we keep text strings separately from the application source code in a particular format(keys & values) so they can be processed in the standard translation mechanism.

• Here frequently used texts such as labels or titles are stored as java dictionary simple types objects.

• To do internationalization, copy the automatically generated *.xlf files and save them under the new name in the same directory.

• For eg :- file convention like <old filename>_<language key>.xlf. Ex:- For German use the language key de.

• For a particular user the locale is specified by the User management engine.

• If not the locale is handled by the browser setting(HTTP Headers)

• If not the default locale specified by the application will be returned.

• If not default locale of the Virtual Machine(VM) is returned

• This locale is passed to java.lang.ResourceBundle in the J2EE engine.

• This will load the physically existing resource bundle either from any one of the following :-

Resource bundle of WD(if exists) or resource bundle of VM (if exists) or

Resource Bundle of without language suffix(always exists) given by the developer.

Hope it helps.

Regards,

Guru

Former Member
0 Kudos

Hi Guru,

Thanks for the reply.

I have followed all the same steps that you have mentioned. I did copied the .xlf files with the langauge suffix. But this is not getting picked up at runtime. This is my problem.

Let me know if you are trying to say something else and how to solve my problem.

Regards

Gaurav Gandhi

Former Member
0 Kudos

Anybody...