internationalization

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

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"));