Java – ResourceBundle example

The java.util.ResourceBundle is a library used for internationalization (multiple languages). It is able to return messages as per the default Locale configured for the system. Such a functionality is used when one develops systems to be used all over the world. 1. How it works? The library reads a property file based on the locale and name …

Read more

JSF 2 internationalization example

In JSF application, you can change your application locale programmatically like this : //this example change locale to france FacesContext.getCurrentInstance().getViewRoot().setLocale(new Locale(‘fr’); It makes JSF support for internationalization or multiple languages easily. Complete JSF internationalization example In this tutorial, we show you a JSF 2.0 web application, which display a welcome page, retrieve a welcome message …

Read more

Spring MVC internationalization example

In Spring MVC application, comes with few “LocaleResolver” to support the internationalization or multiple languages features. In this tutorial, it shows a simple welcome page, display the message from properties file, and change the locale based on the selected language link. 1. Project Folder Directory structure of this example. 2. Properties file Two properties files …

Read more