Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Applet always use same Resource file

 
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
 
Rancher
Posts: 43016
76
  • 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: 43016
76
  • 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));
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic