Note that there are some explanatory texts on larger screens.

plurals
  1. POInternationalization/Localization issue with jstl fmt:message tag
    primarykey
    data
    text
    <p>I have a web application that needs to show in English and Arabic languages. I have added 2 separate resource bundles for English and Arabic. When it uses Arabic language with jstl format <code>&lt;fmt:message key="navigation.welcome"/&gt;</code> it worked fine shows the Arabic words. But when i use <code>&lt;fmt:message var="itemLabel" key="navigation.welcome"/&gt;</code> it does not worked and it shows the unicode value of the key/value pair. The key/value pair stored in Unicode as follow. </p> <pre><code>navigation.welcome = &amp;#1571;&amp;#1607;&amp;#1604;&amp;#1575; &amp;#1608;&amp;#1587;&amp;#1607;&amp;#1604;&amp;#1575;! </code></pre> <p>jsp page as below.</p> <pre><code>&lt;dsp:page&gt; &lt;div id="atg_store_personalNav"&gt; &lt;ul id="atg_store_personalNavItems"&gt; &lt;%-- WISH LISTS LINK --%&gt; &lt;li class ="${activeTab=='WISHLIST' ? ' active' : ' '}"&gt; &lt;fmt:message var="itemLabel" key="navigation.welcome"/&gt; &lt;fmt:message var="itemTitle" key="navigation_personalNavigation.linkTitle"&gt; &lt;fmt:param value="${itemLabel}"/&gt; &lt;/fmt:message&gt; &lt;dsp:droplet name="ProfileSecurityStatus"&gt; &lt;%-- Logged in User --%&gt; &lt;dsp:oparam name="loggedIn"&gt; &lt;dsp:a id="myWishList" page="/myaccount/myWishList.jsp" title="${itemTitle}" iclass="atg_store_navWishList"&gt; &lt;c:out value="${itemLabel}"/&gt; &lt;/dsp:a&gt; &lt;/dsp:oparam&gt; &lt;%-- Anonymous user or logged in from cookie --%&gt; &lt;dsp:oparam name="default"&gt; &lt;dsp:a id="myWishList" page="/global/util/loginRedirect.jsp?error=wishlistNotLoggedIn" title="${itemTitle}" iclass="atg_store_navWishList"&gt; &lt;dsp:property bean="SessionBean.values.loginSuccessURL" value="myWishList.jsp"/&gt; &lt;c:out value="${itemLabel}"/&gt; &lt;/dsp:a&gt; &lt;/dsp:oparam&gt; &lt;/dsp:droplet&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/dsp:page&gt; </code></pre> <p>var option need to used with fmt:message for later use. Can somebody help me?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload