FAQ
Hi Friends,
I tried struts2-blank-2.1.6.war example and its working fine.but when i
tried to make it arabic locale i am not able to make it :(

with reference to below link i am also facing same problem for Arabic.plz
help!

http://mail-archives.apache.org/mod_mbox/struts-issues/200902.mbox/%3c404086922.1233610965824.JavaMail.jira@brutus%3e

Thanks & Trgards,
Sajid
--
View this message in context: http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp22222312p22222312.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

Search Discussions

  • Nuwan Chandrasoma at Feb 27, 2009 at 6:57 am
    Hi,

    you have to convert the arabic into Unicode and put to the message
    properties file,

    Thanks,

    Nuwan

    sajidbigler wrote:
    Hi Friends,
    I tried struts2-blank-2.1.6.war example and its working fine.but when i
    tried to make it arabic locale i am not able to make it :(

    with reference to below link i am also facing same problem for Arabic.plz
    help!

    http://mail-archives.apache.org/mod_mbox/struts-issues/200902.mbox/%3c404086922.1233610965824.JavaMail.jira@brutus%3e

    Thanks & Trgards,
    Sajid

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
    For additional commands, e-mail: user-help@struts.apache.org
  • Sajidbigler at Feb 27, 2009 at 7:03 am
    Hi Numan,

    I am doing that by using following site http://www.utf.ru/tables/arabic.html
    i am using sample example struts2-blank-2.1.6.war

    HelloWorld.jsp

    <li>
    <s:url id="url" action="HelloWorld">
    <s:param name="request_locale">ar</s:param>
    </s:url>
    <s:a href="%{url}">Arabic</s:a>
    </li>

    package_ar.properties

    HelloWorld.message= &#1578;
    requiredstring = ${getText(fieldName)} &#1577;.
    password = &#1578;&#x62a;
    username = &#1580;&#x62c;
    Missing.message =&#1539;

    I iam sucessful to get it in tittle but not in page why? :(


    --
    View this message in context: http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp22222312p22240539.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
  • Sajidbigler at Feb 27, 2009 at 7:19 am
    Hi Nuwan,
    Thanks a lot for your quick response.

    I am doing that by using following site

    http://www.utf.ru/tables/arabic.html

    i am using sample example struts2-blank-2.1.6.war

    HelloWorld.jsp

    <li>
    <s:url id="url" action="HelloWorld">
    <s:param name="request_locale">ar</s:param>
    </s:url>
    <s:a href="%{url}">Arabic</s:a>
    </li>

    package_ar.properties

    HelloWorld.message= ت
    requiredstring = ${getText(fieldName)} ة.
    password = تت
    username = جج
    Missing.message =؃

    I iam sucessful to get it in tittle but not in page why? :(.its like Arbic
    is recognized in Action class i.e java like setMessage(getText(MESSAGE)); )
    and even in validation framework as

    <field name="username">
    <field-validator type="requiredstring">
    <message key="requiredstring"/>
    </field-validator>
    </field>


    above will also evaluate to proper arabic character but brower wont render
    it properly if its from jsp like

    <s:property value="message"/>

    I am using firefox and tools-options-advance-languages is to Arabic
    --
    View this message in context: http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp22222312p22240691.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
  • Sajidbigler at Feb 27, 2009 at 11:38 am
    Hi,

    have you tried this.

    <s:property value="message" escape="false"/>

    Thanks,

    Nuwan

    --------------------------------------------------------------------------------------------

    Hi Nuwan,

    I tried and i got it as you said to <s:property value="message"
    escape="false"/>

    Can you please elaborate what exactly it conveys to browser and what was
    going wrong ?


    But still that doest resolve my issue

    <s:textfield name="username" key="some.key" />

    <s:fielderror />

    These above Tag's are still not getting updated with localization and how
    will you differentiate spanish worked with out all these rules why?

    and the action fields after validation still giving me problem as key i will
    be getting in English Locale


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

    <s:actionerror /> gets proper i18n but <s:fielderror /> won't

    How can we make sure <s:fielderror /> , <s:textfield name="username"
    key="some.key" /> will also work ?

    Thanks,

    Sajid
    --
    View this message in context: http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp22222312p22244146.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
  • Nuwan Chandrasoma at Feb 27, 2009 at 1:15 pm
    http://struts.apache.org/2.x/docs/how-do-i-add-i18n-to-a-ui-tag-like-the-textfield-tag.html

    sajidbigler wrote:
    Hi,

    have you tried this.

    <s:property value="message" escape="false"/>

    Thanks,

    Nuwan

    --------------------------------------------------------------------------------------------

    Hi Nuwan,

    I tried and i got it as you said to <s:property value="message"
    escape="false"/>

    Can you please elaborate what exactly it conveys to browser and what was
    going wrong ?


    But still that doest resolve my issue

    <s:textfield name="username" key="some.key" />

    <s:fielderror />

    These above Tag's are still not getting updated with localization and how
    will you differentiate spanish worked with out all these rules why?

    and the action fields after validation still giving me problem as key i will
    be getting in English Locale


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

    <s:actionerror /> gets proper i18n but <s:fielderror /> won't

    How can we make sure <s:fielderror /> , <s:textfield name="username"
    key="some.key" /> will also work ?

    Thanks,

    Sajid

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
    For additional commands, e-mail: user-help@struts.apache.org
  • Sajidbigler at Feb 28, 2009 at 7:48 am
    i have changed <s:textfield name="username" key="some.key" />

    to

    <s:textfield label="%{getText('some.key')}" name="username" />

    Still problem din't resolved.
    How about <s:fielderror /> these too are not i18n only <s:actionerror />
    works fine

    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]
    --
    View this message in context: http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp22222312p22259630.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
  • Sajidbigler at Mar 1, 2009 at 5:43 pm
    we can make it in Spanish,German and few but few we cant.which we cant is
    Arabic. is this a bug can i report to devlopment list?can any one help me
    out? :(
    --
    View this message in context: http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp22222312p22275384.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
  • Dave Newton at Mar 2, 2009 at 12:32 am

    sajidbigler wrote:
    we can make it in Spanish,German and few but few we cant.which we cant is
    Arabic. is this a bug can i report to devlopment list?can any one help me
    out? :(
    Can you describe the exact problem again? Under what circumstances are
    you unable to get localized Arabic messages?

    Dave


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
    For additional commands, e-mail: user-help@struts.apache.org
  • Sajidbigler at Mar 2, 2009 at 5:59 am
    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
  • kavita P at Mar 10, 2009 at 6:20 am
    Hi Friends,

    I am also trying out the same example and facing the same problem.

    I am trying to make japanese locale but not able to do that.

    I have saved the package_ja.properties file as UTF-8 type.

    I have tried all the option mention below but all in vain.

    Can anyone please help.

    Appriciate your help.

    Thanks & Regards,
    Kavita



    sajidbigler wrote:
    Hi Friends,
    I tried struts2-blank-2.1.6.war example and its working fine.but when i
    tried to make it arabic locale i am not able to make it :(

    with reference to below link i am also facing same problem for Arabic.plz
    help!

    http://mail-archives.apache.org/mod_mbox/struts-issues/200902.mbox/%3c404086922.1233610965824.JavaMail.jira@brutus%3e

    Thanks & Regards,
    Sajid
    --
    View this message in context: http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp22222312p22428688.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
  • Sajidbigler at Mar 10, 2009 at 3:58 pm
    Hi Kavita,

    If you use <s:form theme="simple" then key will work use utf-8 link which i
    have send or you can even go with <s:text also.if you have any more clarity
    ping me on sajidbigler@gmail.com

    bye
    --
    View this message in context: http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp22222312p22437387.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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriesstruts
postedFeb 26, '09 at 11:31a
activeMar 10, '09 at 3:58p
posts12
users5
websitestruts.apache.org
irc#struts

People

Translate

site design / logo © 2016 Grokbase