Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

WD - ResourceBundle (xxx.properties)

Hi,

I've currently a WD application in which I retrieve data from a <i>properties-file</i> (for language issues) depending on the <b>Locale</b>.

For the moment I read the file with <b>FileReader & BufferedReader</b> (works fine), but I want to use <b>ResourceBundle</b> because I can easily read the file with a key.

But the problem is, that I cannot read the <i>properties-file</i> or better said, I don't know where to place the file.

The error message I get is:

<i>Can't find bundle for base name rb_file, locale en_US</i>

Anyone encountered this issue?

Greetz,

Bart

replied

Hi Bart,

U can place the property file in the gen_wdp>packages><Your Package Name>.

Right click the package name and paste the file in this structure.

For accessing this resoutrce bundle inside ur component.

<b>ResourceBundle bundle = ResourceBundle.getBundle("<path of the resource bundle.(Package name.Res bundle name)>");

String name = bundle.getString("<value inside the res bundle>");</b>

Hope it helps,

Regards,

Nagarajan.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question