Multi-language Support for Smart Sync-based Applications | Creating Resource Bundles | FAQ
Internationalization describes the process to create applications that display messages and handle user input according to the language setting of the client (also known as "locale"). To do this, the messages of an application are stored in a text file, called resource bundle, separated by language. The resource bundles are named with the ending of the ISO country code (for example, _de for German, _en for English and so on). The application takes the proper resource bundle, according to the language setting of the client. See chapter "creating resource bundles" for more information, how to create resource bundles with Eclipse and JBuilder.
Steps for Internationalization:
file.encoding
has to be set to the
proper language (for example, MS932 for Japanese)<META>
HTML tag with charset=UTF-8 for each
HTML page<%@ page %>
JSP directive with charset=UTF-8
in every JSP page. The response of the servlet must return the same charset
value (for example, HttpServletResponse.setContentType("text/html;
charset=UTF-8");
) Request.setCharacterEncoding()
is not available
in Tomcat 3.x).
See the JSP template how to set the <META> tag and convert strings.
For every supported language there is a corresponding resource bundle e that consists of key-value-pairs. Every language-dependent string has a unique key. To make best use of resource bundles, following issues should be considered:
<%
// load resource bundle
ResourceBundle resource = ResourceBundle.getBundle("nameOfYourBundle");
String messagetext = resource.getString("messageTextKey");
%>
The Mobile Infrastructure handles character encoding for data synchronization
(see ParameterConverter).