Author: truong.le
Date: 2009-12-17 02:44:42 -0500 (Thu, 17 Dec 2009)
New Revision: 1034
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java
Log:
GTNPORTAL-207: Problem when change language in Portal
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2009-12-17
04:42:45 UTC (rev 1033)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2009-12-17
07:44:42 UTC (rev 1034)
@@ -274,7 +274,7 @@
}
if (getNavigations().size() < 1)
return null;
- // TODO dang.tung: get right selectedNavigation
+ // TODO dang.tung: get right selectedNavigation
// -------------------------------------------
List<PageNavigation> navs = getNavigations();
PageNavigation pNav = navs.get(0);
@@ -390,16 +390,16 @@
{
for (PageNavigation nav : navigations)
{
- localizePageNavigation(nav);
+ localizePageNavigation(nav,locale);
}
}
- private void localizePageNavigation(PageNavigation nav)
+ private void localizePageNavigation(PageNavigation nav,Locale locale)
{
ResourceBundleManager mgr = getApplicationComponent(ResourceBundleManager.class);
if (nav.getOwnerType().equals(PortalConfig.USER_TYPE))
return;
- ResourceBundle res = mgr.getNavigationResourceBundle(locale, nav.getOwnerType(),
nav.getOwnerId());
+ ResourceBundle res = mgr.getNavigationResourceBundle(locale.getLanguage(),
nav.getOwnerType(), nav.getOwnerId());
for (PageNode node : nav.getNodes())
{
resolveLabel(res, node);
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java 2009-12-17
04:42:45 UTC (rev 1033)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java 2009-12-17
07:44:42 UTC (rev 1034)
@@ -134,6 +134,10 @@
if (userProfile != null)
{
portalLanguage =
userProfile.getUserInfoMap().get("user.language");
+ if(portalLanguage == null)
+ {
+ portalLanguage = "en";
+ }
}
else
{
Show replies by date