• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Internationalization

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Following is my JSP code:
<%@page import =" java.util.*" %>
<%!
String language;
String country;
%>
<%
try
{
language = new String("fr");
country = new String("FR");
Locale currentLocale;
ResourceBundle messages;
currentLocale = new Locale(language, country);
messages = ResourceBundle.getBundle("MessagesBundle",currentLocale);


out.println(messages.getString("greetings"));
out.println(messages.getString("inquiry"));
out.println(messages.getString("farewell"));
}catch (Exception e) {out.println(e);}

%>
<html>
<body>
<h2>Kumar</h2>
</body>
</html>
If i try executing the page in IE i am getting following error and one more thing is all the resource bundle files are residing in the directory.
Error :
java.util.MissingResourceException: can't find resource for MessagesBundle_fr_FR
Any one can suggest how it has to be done.
Thanks
Venky
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
if properties file are in the classpath then you will not
get exception.
In case you r using tomcat keep properties file in already
set classpath or change it.
regards
sharang
 
reply
    Bookmark Topic Watch Topic
  • New Topic