struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sajidbigler <sajidbig...@gmail.com>
Subject Re: Please help to get Arabic i18n(internationalization) using struts2.1.6
Date Mon, 02 Mar 2009 05:59:07 GMT

Hi Dave,

Its like when i  tried struts2-blank-2.1.6.war example and its working
fine.here the logic is not much more complicated.here <s:text
name="HelloWorld.message"/> returns proper i18n even Arabic.
<s:property value="message" /> this tag wont return proper Arabic i18n
.unless we do <s:property value="message" escape="false"/>. i really dint
understand how come spanish ,german work but not Arabic.

Next <s:textfield name="username" key="some.key" /> or <s:textfield
name="username" label="%{getText('some.key1')}" /> wont even gives me proper
i18n.

When form is submitted <s:actionerror /> will be in i18n but not
<s:fielderror />.i have declared validation as follows

	<field name="username">
		<field-validator type="requiredstring">
			true
			<message key="some.key8">Login name is required</message>
		</field-validator>
	</field>

i used following link http://www.utf.ru/tables/arabic.html to get utf-8
characters..

MMSApplicationMessages_ar.properties

error.password.match=&#1551;
some.key1=&#1539;
some.key=&#1580;
some.key8=&#1594;	

MMSApplicationMessages.properties

error.password.match= Sajid retype password
some.key1=Login Name1
some.key=Login Name
some.key8=Login Name8

struts.properties

struts.multipart.maxSize=4194304
#struts.enable.DynamicMethodInvocation = false
### Parser to handle HTTP POST requests, encoded using the MIME-type
multipart/form-data
# struts.multipart.parser=cos
# struts.multipart.parser=pell
struts.multipart.parser=jakarta
# uses javax.servlet.context.tempdir by default
struts.multipart.saveDir=c:\gowri
struts.devMode = true
struts.i18n.reload=true
struts.locale=ar_SA
struts.i18n.encoding=UTF-8
struts.custom.i18n.resources=MMSApplicationMessages
struts.ui.theme=xhtml
struts.ui.templateDir=template

Form

<div id="content">
<h1>Welcome to "MMS Application "...</h1>
<h2>Enter Login Details  </h2>

	<s:form action="doLogin" method="POST" >
		<s:label label="SignIn"/>
		<s:actionerror /> <s:fielderror />
		
		<s:textfield name="username" key="some.key" />
		<!--<s:textfield name="username" label="%{getText('some.key1')}" />-->
		<s:password name="password" label="Password" />
		<s:submit value="Login" align="center" />
	</s:form>
	<s:a href="pages/SignUp.jsp" cssStyle="float:right">New User SignUP</s:a>

</div>

More over i am able to see following warnings in console

Feb 28, 2009 12:56:15 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [theme]
Feb 28, 2009 12:56:15 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [theme]
Feb 28, 2009 12:56:15 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [templateDir]
Feb 28, 2009 12:56:15 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [templateDir]
Feb 28, 2009 12:56:15 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [theme]
Feb 28, 2009 12:56:15 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [theme]
Feb 28, 2009 12:56:15 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [fieldErrors]
Feb 28, 2009 12:56:15 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [fieldErrors]
Feb 28, 2009 12:56:15 PM
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Could not find property [fieldErrors]


Please help me to sort out this issue..

Thanks

Sajid
-- 
View this message in context: http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp22222312p22282614.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message