Supporting multiple languages

In Widget Framework, application resource files are used to store static texts that appear in the framework. They are used to support multiple languages and provide an easy way to switch between them.

You will have to specify a separate application resource file for each of the languages that you want the Widget Framework to support. The naming convention for these files is ApplicationResources_[language-code].properties, where [language-code] stands for the ISO 639-1 code of the language. For an example, suppose you want to display Widget Framework in German. Then -

  1. Create an ApplicationResources_de.properties file

  2. Store it in the [path-to-your-publication]/WEB-INF/classes/com/escenic/framework/ folder

  3. Modify the language-code section parameter of the publication's Home section and change it to de(if the parameter is missing then you need to create it)

Note that you don't need to restart ECE to include new application resource files, but if you modify contents of an existing one then you need to reboot the server. If you want to avoid server reboot, then after editing the resource file rename it to something else (i.e., messsage.properties and then modify the javax.servlet.jsp.jstl.fmt.localizationContext parameter in the web.xml file to include the name of the new file. This parameter value is set to com.escenic.framework.ApplicationResources by default, which you should change to com.escenic.framework.[new-file-name].