Using Malayalam in JSTL
Hi,
I have been trying to use malayalam using jstl.
Here is my code
i have a properties file called home_ml_IN.properties
which contains entries like
message.createmobchannelid=നിങ്ങളുടെ ജനകീയ ചാനല്?വിലാസം ഉണ്ടാക്കൂ...
user.firstName=പേര്?
user.secondName=പിന്?പേര്?
user.Email=ഇ-മെയില്?
user.MobileNo=മൊബൈല്?നമ്പര്?
user.password=രഹസ്യ മന്ത്രം
user.sex=ലിംഗം
user.sex.male=ആണ്?
user.sex.female=പെണ്ണ്?
user.dob=ജനന തീയതി
I have converted this to native2ascii also ..so lets call it version 2
now i have a login page
<%@page pageEncoding="UTF-8"%>
<%@ page language="java" contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/c-rt.tld" prefix="c"%>
<%@ taglib uri="/WEB-INF/fmt-rt.tld" prefix="fmt"%>
<fmt:setLocale value="${locale}"/>
<fmt:bundle basename="home" >
<img src="<%=request.getContextPath()%>/images/login.png" align="absbottom">
<c:choose>
<c:when test="${empty userAccount}" >
<html:link action="/register?dispatch=register" >
<fmt:message key="registration.registernow" />
</html:link>
<c:if test="${userMessage == 'SIGNIN_FAILED'}">
<fmt:message key="message.sigin.failed"/>
</c:if>
<c:if test="${userMessage == 'REGISTRATION_NOT_CONFIRMED'}" >
<fmt:message key="message.signin.notconfirmed"/>
</c:if>
<html:form method="POST" action ="/submitLogIn">
<table class="login_contentimg" cellspacing="0" cellpadding="0">
<tr>
<td nowrap>
<fmt:message key="user.Email" />
</td>
<td>
<input name="userEmail" type="text" class="loginTextBox">
</td>
</tr>
<tr>
<td>
<fmt:message key="user.password"/>
</td>
<td>
<input name="userPassword" type="password" class="loginTextBox">
</td>
</tr>
<tr>
<td align="right">
<input type="checkbox" name="rememberMe" value="rememberMe" />
</td>
<td>
<fmt:message key="signin.rememberme" />
</td>
</tr>
<tr>
<td></td>
<td>
<html:submit><fmt:message key="signin.signin"/></html:submit>
<html:link action="/forgotpassword?dispatch=forgotpassword">
<fmt:message key="signin.forgotPassword" />
</html:link>
</td>
</tr>
</table>
</html:form>
</c:when>
<c:otherwise>
<html:link action="/logout?dispatch=logout">
<fmt:message key="signin.logout" />
</html:link>
<table class="login_contentimg" cellspacing="0" cellpadding="0">
<tr>
<td nowrap>
<fmt:message key="signin.welcome" />
</td>
<td>
${userAccount.userFirstName} ${userAccount.userLastName}
</td>
</tr>
<tr>
<td></td>
<td>
<html:link action="/changepassword?dispatch=changepassword">
<fmt:message key="message.changepassword" />
</html:link>
</td>
</tr>
</table>
</c:otherwise>
</c:choose>
</fmt:bundle>
This is included in a tiles file .. the mail layout file is lik
<%@page pageEncoding="UTF-8"%>
<%@ page language="java" contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>::.MobChannel</title>
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/mobchannel.css" />
</head>
<body>
<!-- Main Layout Starts -->
<div id="layout">
<!-- Header Starts -->
<div id="header">
<!-- Header Content Comes here -->
<tiles:insert attribute="header" />
</div>
<!-- Header Ends -->
<div id="content">
<html:errors/>
<tiles:insert attribute="body" />
<!-- Content Ends -->
</div>
<div id ="footer" >
<tiles:insert attribute="footer" />
</div>
</div>
</body>
</html>
My Problem is after using both nati2ascii version 2 and version 1 of home.properties in malayalam i am getting junk.
I am setting session.setAttribute(locale,"ml_IN") - just to tell where jstl:setLocale gets it's value from.
I have been burning my head over this for almost a week and i can't get this freaking thing to work.. Guruuuuus help. I am at your feet.

