uCosminexus Portal Framework ポートレット開発ガイド

[目次][用語][索引][前へ][次へ]


11.1.2 言語切り替え対応ポートレットの開発例

使用する言語を判定するJSPファイルのサンプルコードを次に示します。

サンプルコード
<%@ page contentType="text/html; charset=Shift_JIS" %>
<%@ page import="jp.co.hitachi.soft.portal.portlet.beans.PortletInfoBean" %>
<%@ page import="jp.co.hitachi.soft.portal.api.user.LocaleData" %>
<jsp:useBean id="configbean" class="jp.co.hitachi.soft.portal.portlet.beans.PortletInfoBean" scope="page"/>
 
<%
 configbean.initBean(request);
 
 String langType = LocaleData.getLangType(request) ;
 
 if(langType.equals("ja"))
  configbean.setCustomizeTitle("日本語用のタイトルメニューです") ;
 else if(langType.equals("en"))
  configbean.setCustomizeTitle("For English Title Menu") ;
 else
  configbean.setCustomizeTitle("Other Language Title Menu") ;
 
%>
サンプルポートレット

[目次][前へ][次へ]


[他社商品名称に関する表示]

All Rights Reserved. Copyright (C) 2009, 2013, Hitachi, Ltd.
All Rights Reserved. Copyright (C) 2009, 2013, Hitachi INS Software, Ltd.