What is your GateIn version?
There is currently a bug with language codes containing countries like zh_TW and pt_BR. The language code "zh" should work.
The issue concerning this problem
is solved for GateIn 3.1
I've tried GateIn 3.1 GA and even check out the most recent version from svn but the problem is not solved. It's a little different from that issue. I could not make the translation being showed on the navigation nodes anyway. You can check it out by simply changing the language with the upper left menu. The "home" has been translated in the navigation bar (the blue part) but the languages I mentioned are not working.
I am lost. Please, can you exactly describe what is not working. Adding a new language, a new navigation node? What are your step 1. 2. 3. etc.? Have you tried the same for other languages (like Spanish or French)?
Thank you. Soren
I've done some code modification in
the problem solved.
What did you modifiy.
You don't need to modify the java code to make international navigation nodes work. Please open a jira if there is a bug. Or publish your code modification here.
in the method
public static void localizePageNavigation(PageNavigation nav, Locale locale, ResourceBundleManager i18nManager)
ResourceBundle res =
i18nManager.getNavigationResourceBundle(locale.getLanguage(), nav.getOwnerType(), nav.getOwnerId());
String localeName = LocaleContextInfo.getLocaleAsString(locale);
ResourceBundle res =
i18nManager.getNavigationResourceBundle(localeName, nav.getOwnerType(), nav.getOwnerId());
I believe this is a bug. Hope this helps.
Why did you do this? What is the difference? Should this be integrated in GateIn?
It's a similar issue to https://issues.jboss.org/browse/GTNPORTAL-1302
locale.getLanguage() missed the country code.
We have to use [language]_[country] instead of [language]
The naviation nodes couldn't display the translation correctly if the resource file name is with country. eg. classic_zh_TW.xml, classic_pt_BR.xml.
I am sure this should be integrated in Gatein to fix this problem.
That's right, could you open a JIRA issue for this, Cenoq ?
Thanks for the analysis, the JIRA + the patch ! It's not that often that we get all 3 together.
Thanks again !