Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Absolutely. Internationalization (<code>i18n</code>) is handled out-of-the-box in almost every framework out there, then it's better to spend time on understand how to make it works than to write some unneded, buggy custom solution.</p> <p>With Struts2, you must ensure to have:</p> <ul> <li>I18nInterceptor in your Interceptor Stack;</li> <li>I18nInterceptor defined in struts.xml: <code>&lt;constant name="struts.custom.i18n.resources" value="global" /&gt;</code>;</li> <li>the localized, correctly named global.properties file for each locale you want to handle;</li> <li>the <code>request</code>_locale` parameter (if you have not changed the language in your browser) when calling your Actions, giving the I18nInterceptor the ability to hijack the request to the correct resource;</li> <li>an appropriate character encoding on your pages: <code>&lt;%@ page contentType=”text/html;charset=UTF-8″ %&gt;</code>.</li> </ul> <p>Take a look at the guides available on the web too:</p> <blockquote> <p><a href="http://www.mkyong.com/struts2/struts-2-i18n-or-localization-example/" rel="nofollow">http://www.mkyong.com/struts2/struts-2-i18n-or-localization-example/</a></p> <p><a href="http://www.2bloggers.com/2011/12/localization-i18n-in-struts2.html" rel="nofollow">http://www.2bloggers.com/2011/12/localization-i18n-in-struts2.html</a></p> <p><a href="http://www.roseindia.net/struts/struts/struts2.2.1/tags/i18ntag.html" rel="nofollow">http://www.roseindia.net/struts/struts/struts2.2.1/tags/i18ntag.html</a></p> <p><a href="http://www.roseindia.net/struts/strutsinternationalization.shtml" rel="nofollow">http://www.roseindia.net/struts/strutsinternationalization.shtml</a></p> <p><a href="http://www.roseindia.net/tutorials/I18N/internationalison-code.shtml" rel="nofollow">http://www.roseindia.net/tutorials/I18N/internationalison-code.shtml</a></p> </blockquote>
    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.
    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