-
1. Re: Multi-Language Navigation Nodes failed for zh_TW, zh & pt_BR
sorenschmidt Jan 3, 2011 2:44 PM (in response to cenoq)Hi cenoq,
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
https://issues.jboss.org/browse/GTNPORTAL-1302
is solved for GateIn 3.1
cu
Soren
-
2. Re: Multi-Language Navigation Nodes failed for zh_TW, zh & pt_BR
cenoq Jan 3, 2011 9:41 PM (in response to sorenschmidt)Hi Soren,
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.
-
3. Re: Multi-Language Navigation Nodes failed for zh_TW, zh & pt_BR
sorenschmidt Jan 4, 2011 5:15 AM (in response to cenoq)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)?
-
4. Re: Multi-Language Navigation Nodes failed for zh_TW, zh & pt_BR
cenoq Jan 4, 2011 10:14 AM (in response to sorenschmidt)Thank you. Soren
I've done some code modification in
/portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java
the problem solved.
-
5. Re: Multi-Language Navigation Nodes failed for zh_TW, zh & pt_BR
sorenschmidt Jan 4, 2011 10:21 AM (in response to cenoq)Cenoq,
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.
cu
Soren
-
6. Re: Multi-Language Navigation Nodes failed for zh_TW, zh & pt_BR
cenoq Jan 4, 2011 11:00 AM (in response to sorenschmidt)Hi Soren,
in the method
public static void localizePageNavigation(PageNavigation nav, Locale locale, ResourceBundleManager i18nManager)
I replace
ResourceBundle res =
i18nManager.getNavigationResourceBundle(locale.getLanguage(), nav.getOwnerType(), nav.getOwnerId());
with
String localeName = LocaleContextInfo.getLocaleAsString(locale);
ResourceBundle res =
i18nManager.getNavigationResourceBundle(localeName, nav.getOwnerType(), nav.getOwnerId());that's it.
I believe this is a bug. Hope this helps.
-
7. Re: Multi-Language Navigation Nodes failed for zh_TW, zh & pt_BR
sorenschmidt Jan 4, 2011 11:16 AM (in response to cenoq)Why did you do this? What is the difference? Should this be integrated in GateIn?
-
8. Re: Multi-Language Navigation Nodes failed for zh_TW, zh & pt_BR
cenoq Jan 4, 2011 11:57 AM (in response to sorenschmidt)Hi Soren,
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.
-
9. Re: Multi-Language Navigation Nodes failed for zh_TW, zh & pt_BR
trong.tran Jan 5, 2011 3:20 AM (in response to cenoq)That's right, could you open a JIRA issue for this, Cenoq ?
-
10. Re: Multi-Language Navigation Nodes failed for zh_TW, zh & pt_BR
cenoq Jan 5, 2011 10:24 PM (in response to cenoq)OK. The issue has been created.
-
11. Re: Multi-Language Navigation Nodes failed for zh_TW, zh & pt_BR
theute Jan 6, 2011 3:54 AM (in response to cenoq)Thanks for the analysis, the JIRA + the patch ! It's not that often that we get all 3 together.
Thanks again !