Home  >  Forum  >  Java EE
Post New Query

internationalization


joined on
November 05,2013
Asked on November 05,2013
how can i do dynamic internationalization means data comes from database when displayed in view we have change language based on locale .

please help me in this.
thanks & regards,
raja
joined on
March 14,2013
Replied on November 07,2013

Suppose you have properties file as resource_en.properties
get the country code from database and set it as

Locale locale = new Locale("en","US")
ResourceBundle bundle = ResourceBundle.getBundle("resource", locale );

Sysout.out.println(bundle.getString("cp.name"));
Sysout.out.println(bundle.getString("cp.age"));


Write Answer









Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us