cancel
Showing results for 
Search instead for 
Did you mean: 

java.util.MissingResourceException: Can't find bundle for base name

Former Member
0 Kudos

Hi ....

I created an application for Internationalization.I followed " Developing International Web dynpro application".IAm getting the output with out the language conversion.

Again i tried with writing the resource bundle code in the init method---in this case iam getting this error.

java.util.MissingResourceException: Can't find bundle for base name com.sap.languages, locale de

My doubt is, there any need to write resource bundle code in this application or any settings i have to provide in local pc.

I added the required language in the browser.

Please tell me where i went wrong.

Thanks in advance

Regards

Sushma

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

iam trying to sort this in another way.

Former Member
0 Kudos

Hi Sushma,

A resource bundle is none other but a set of properties files (language-specific key/value pairs).

These properties files for a Web Dynpro component are in the directory /gen_wdp/packages/ under the name of respective WD Component. (Refer in detail the sections 3.5 - pg 14-16 & 3.8 -pg 20-22 at the link provided in above post)

Kind Regards,

Nitin

Correction: The corresponding properties files are generated from xlf files on step 'Create New Archive & Run' instead of Reload + Rebuild as mentioned earlier (Note on pg 14 top).

Edited by: Nitin Jain on Apr 21, 2009 4:22 PM

Former Member
0 Kudos

Hi Sushma,

There is no need to write any code in wdDoInit() method.

To run the application in any language, you need corresponding properties file as these are read by Web Dynpro runtime (not xlfs).

First you need to create corresponding xlf files using copy-paste (*_de.xlf for german language) - this can be achieved thru section 'Translating Text Resources into Other Languages' in tutorial 'Developing International Web Dynpro Applications' (pages 18-22).

Do Reload + Rebuild the project - this will create corresponding properties files (*_de.properties).

Now since you have multiple properties files in your project, the Web Dynpro runtime searches for the corresponding properties file as per the logic given in both the links (first it takes user authentication language, then browser language, then application property & so on)

Thats why you can set the application property 'DefaultLocale' to 'de' (for German language) if the first 2 search parameters are not defined.

Hope this clarifies the concept.

Kind Regards,

Nitin

Former Member
0 Kudos

Hi Nitin,

First i didnt add code in the application.Iam getting the output in default language only. Then after i tried with this...adding Resource bundle code in the init method.at this point iam getting error.

Hey,

I copied all the .Xlf files to _en and _de format.Then after in the S2X editor i opened and changed the language.

Deploy and run -


default language only.

I added the req. language in the browser.

One more doubt ,,,,,where we will get the message bundle.properities in the web dynpro.Please give the path for that.

Former Member
0 Kudos

Hi Sushma,

I think it worked in English language earlier. Now you are trying to run the application in German language (locale de)

But from MissingResourceException, it means that it is not able to find the corresponding resource properties file for locale 'de'.

The Web Dynpro build generates the properties files for the corresponding xlf files (Reload + Rebuild step), so the properties correspoding to locale 'de' will be there if *_de.xlf existed earlier before the build step.

Refer below link (if have not gone through earlier)

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/4f5b88e5-0601-0010-cd99-8b88a4d9...

I hope this clarifies your concern.

Kind Regards,

Nitin

Former Member
0 Kudos

Hi Nitin,

Where i have to check this in my application, is there any steps need to add.

Please Help me.