Internationalization

I plan to design a web page with language options like English and Traditional Chinese. User could choose the output language they want.

My computer uses the Hong Kong SAR for the regional and the language setting. When I open a jsp page, it displayed "?title?" for the title. Below is an example of my code:

Code of welcome.jsp:

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>

<fmt:bundle basename="welcome">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title><fmt:message key="title"/></title>

</head>

</html>

</fmt:bundle>

Code of welcome_en.properties:

title=Welcome!

Code of welcome_zh_hk.properties:

title=歡迎光臨!

But, when I change the language setting to English, it could display normally. What had I missed show that I could not displayed Traditional Chinese as desired?

[1352 byte] By [HoneyLemona] at [2007-11-26 16:27:33]
# 1
HelloYou need to save the jsp file as UTF-8, that option can be in the editor file properties.
Ori-Gila at 2007-7-8 22:51:46 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
I had used the tool native2ascii to convert the traditional Chinese character to the appropriate encoding. Then, I solve my problem.
HoneyLemona at 2007-7-8 22:51:46 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Hi,please use UTF-8 to make the internalization and go for different languages.,
loguKKa at 2007-7-8 22:51:46 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

> Hi,

>

> please use UTF-8 to make the internalization and go

> for different languages.,

I had tried the method you mentioned before I posted to the forum. It is unsuccessful to do so. It would give out some garbage characters.?

> Hello

> You need to save the jsp file as UTF-8, that option

> can be in the editor file properties.

I use Eclipse to develop my web application. So, I think the IDE will use the suitable format to save the file. Am I right? I'm not sure.

Anyway, my problem solved. I had saved the properties file in ANSI format using NotePad. Then, use the native2ascii tool to convert the file to the approach format. Finally, it works.

If I saved those properties file in UTF-8 format. No matter I use the native2ascii or not. It would give out some garbage characters.

HoneyLemona at 2007-7-8 22:51:46 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...