Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet always use same Resource file

 
app nig
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
I have a HTML page embedded with Applet. This applet takes string from property file using ResourceBundle. I send a parameter from HTML page to decide the language of applet e.g. de for germany and en for english.
My problem is , applet always use one property file. it does not changes property file according to passed parameter.If I passed paramater for english "en", then it always take property file for english wheather I passed parameter for english or German or French.
I deleted the file from control panel java plugins. i also removed files in my browser cache. But it does not work. Please let me know how can I solve my problem. Is there any other option for localization, instead of ResourceBundle class in core java
thanks
Appi
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello "appi"-

Welcome to JavaRanch.

On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.

This forum is meant for question about this site, not for any Java-related question. I'll move it to the applet forum.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How is the parameter passed to the applet? How are you using that parameter to select the resource bundle?
 
app nig
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am passing parameter using <PARAM> tag, which I get inside applet with that param name. Based on that parameter I create ResourceBundle object. e.g.

String myLanguage= getParameter("parameter_name");
String BUNDLE_NAME = "myPropertFile";
ResourceBundle RESOURCE_BUNDLE=ResourceBundle.getBundle(BUNDLE_NAME,new Locale(myLanguage));
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic