PDA

View Full Version : Question related to displaying i18n messages


ganesh pol
Mar 17th, 2006, 06:26 AM
problem is


i am using spring's 18n support for displaying messages in locale specific format

these messages are displayed on my machine as what i want

but when i am trying to display same jsp from other machines which are in LAN ,messages are something like square boxes

how should i display same locale specific messages on other machines
and not square boxes






part of jsp page relevent to this context is

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

.
.
.
.
.
.
.
<spring:message code="login"/>
.
.
.
..
<spring:message code="password"/>
.
.
.
.
.
.
.

<form method="POST" name="changeLanguageForm">
<table border="0" align="center" cellpadding="0" cellspacing="0"
width="50%">
<tr>
<td align="center" valign="middle">
<select name="changeLanguageSelect"
size="1"
onChange="window.location=document.changeLanguageForm.change LanguageSelect.options[document.changeLanguageForm.changeLanguageSelect.s electedIndex].value">
<option value="-1">select</option>
<option value="?locale=en&a1.core">English</option>
<option value="?locale=mr&a1.core">Marathi</option>
</select>
</td>
</tr>
</table>
</form>










and messages_mr.properties file content is

login=\u0932\u0949\u095A
password=\u0917\u0941\u09A2\u0924\u0965\u092E


i think if i am not making mistake then browser must have the fonts
according to locale seleted
then how should i dynamically download fonts on user 's machine

how should i proceed with spring
for such type of things

chrisjo
Mar 20th, 2006, 03:12 AM
Unfortunately, there's no guarantee that a user will have the required font. Furthermore, there is no standard reliable way to autmatically download a font to a users machine.

If the users get the page with squares instead of text, they most likely lack the needed font. The best thing you can do in this case is to display a message telling them to download the font if the page doesn't make sense. This message of course needs to be displayed in english or another language that can be written in a standard font :)

ganesh pol
Mar 23rd, 2006, 12:39 AM
my dear friend,
Thanks for u r reply

if u have gmail account or if u visit google it provide user pages in locale specific manner how did they have done it

is it possible that in some way that if user select specific locale then these fonts get downloaded to his or her machine or is there any restriction in it for downloading font on user machine ?