扭曲的鉛筆
BlogJava
首頁
新隨筆
聯系
聚合
管理
隨筆 - 37 文章 - 14 trackbacks - 0
<
2007年6月
>
日
一
二
三
四
五
六
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
6
7
常用鏈接
我的隨筆
我的評論
我的參與
最新評論
留言簿
給我留言
查看公開留言
查看私人留言
隨筆分類
AppFuse(2)
BI(5)
DesignPattern(1)
English
Hibernate(1)
J2EE(13)
Lotus(2)
SiteMesh(4)
Spring(6)
生活隨筆(2)
隨筆檔案
2010年8月 (1)
2009年9月 (3)
2009年8月 (1)
2009年6月 (1)
2008年9月 (1)
2008年7月 (2)
2008年3月 (2)
2008年2月 (1)
2007年11月 (4)
2007年10月 (2)
2007年9月 (3)
2007年8月 (4)
2007年7月 (2)
2007年6月 (7)
2007年5月 (2)
文章分類
BI
Hibernate
J2EE
Struts Menu
相關鏈接
ardorsoft_BI Blog
JAVA開源小堂
JAVA雜談(收藏)
Pentaho中國社區
Pentaho之學習BLOG
劉文濤BLOG
商業智能blog
我的店鋪
詩特林(BI)
搜索
最新評論
1.?re: CAS SSO配置(上)
評論內容較長,點擊標題查看
--陌生
2.?re: CAS SSO配置(上)
評論內容較長,點擊標題查看
--陌生
3.?re: JFreeChart顯示
能不能把你的源代碼發給我讓我學習一下,謝謝,謝謝!
songkewei110@126.com
--songkewei
4.?re: Acegi擴展JdbcDaoImpl獲取更多的用戶信息
評論內容較長,點擊標題查看
--acegi
5.?re: CAS SSO配置(上)
2:在窗口2輸入對B應用程式請求,還會需要身份驗證
這不失去sso的意義了嘛
--guooo
閱讀排行榜
1.?CAS SSO配置(上)(9437)
2.?SSO原理(轉摘)(4440)
3.?CAS SSO配置(下)(2813)
4.?Mondrian+JPivot流程簡介(轉)(2455)
5.?SiteMesh 過濾不裝飾的頁面(2440)
評論排行榜
1.?CAS SSO配置(上)(5)
2.?基于oracle數據庫的appfuse項目(轉摘)(2)
3.?Acegi擴展JdbcDaoImpl獲取更多的用戶信息(1)
4.?Struts2學習一(1)
5.?Acegi 關鍵組件詳述(轉)(1)
Mondrian國際化
在Schema里的Dimension、Level、Measure標簽都有一個caption屬性,在shecma里有個measuresCaption屬性,Hierarchy里有個allMemberCaption屬性都是國際化顯示用的。格式為:caption="%{}"
通過以下幾個步驟便可實現國際化
一、修改Schema如下
.
<
Dimension
foreignKey
="TIME_ID"
name
="TIME"
>
<
Hierarchy
hasAll
="true"
allMemberName
="All time"
primaryKey
="TIME_ID"
allMemberCaption
="%{compensation.dimension.time.allmember.caption}"
>
<
Table
name
="TIME_TO_MONTH"
>
</
Table
>
<
Level
name
="YEAR"
table
="TIME_TO_MONTH"
column
="YEAR"
type
="String"
uniqueMembers
="false"
levelType
="Regular"
hideMemberIf
="Never"
>
</
Level
>
<
Level
name
="QUARTER"
table
="TIME_TO_MONTH"
column
="QUARTER"
type
="String"
uniqueMembers
="false"
levelType
="Regular"
hideMemberIf
="Never"
>
</
Level
>
<
Level
name
="MONTH"
table
="TIME_TO_MONTH"
column
="MONTH"
type
="String"
uniqueMembers
="false"
levelType
="Regular"
hideMemberIf
="Never"
>
</
Level
>
</
Hierarchy
>
</
Dimension
>
<
Measure
name
="UOT1"
column
="UOT1"
caption
="%{compension.measure.uot1.caption}"
datatype
="Numeric"
formatString
="#,##0.###"
aggregator
="sum"
>
</
Measure
>
二、在WEB Application 的classes里創建對應的國際化文件,命名如下locale_zh_CN.properties
compensation.dimension.time.allmember.caption=\u5168\u90e8\u65f6\u95f4
compensation.dimension.position.allmember.caption=\u5168\u90e8\u8d44\u4f4d
compension.measure.uot1.caption=1.5\u500d\u52a0\u73ed\u65f6\u6570
compension.measure.uot2.caption=2\u500d\u52a0\u73ed\u65f6\u6570
compension.measure.uot3.caption=3\u500d\u52a0\u73ed\u65f6\u6570
三、在classes里添加mondrian.properties文件(默認是在WEB-INF下),并添加下面兩個屬性
Locale:用于指定要使用的語言
mondrian.rolap.localePropFile:國際化文件絕對路徑
Locale=zh_CN
mondrian.rolap.localePropFile=D:\\JAVA\\Tomcat5.5\\webapps\\mondrian\\WEB-INF\\classes\\locale.properties
四、在顯示的頁面上的<jp>標簽里添加dynLocale="zh_CN" dynResolver="mondrian.i18n.LocalizingDynamicSchemaProcessor"
<
jp:mondrianQuery
id
="query01"
jdbcDriver
="oracle.jdbc.OracleDriver"
dynLocale
="zh_CN"
dynResolver
="mondrian.i18n.LocalizingDynamicSchemaProcessor"
jdbcUrl
="jdbc:oracle:thin:@*.*.*.*:1521:wiptest"
jdbcUser
="oee"
jdbcPassword
="oee"
catalogUri
="/WEB-INF/queries/Compensation.xml"
>
select {[Measures].[UOT1],[Measures].[UOT2],[Measures].[UOT3]} ON columns,
{([TIME].[All time],[POSITION].[All position], [DEPT]) } on rows
FROM [Compensation]
</
jp:mondrianQuery
>
關于國際化功能實現相關代碼在LocalizingDynamicSchemaProcessor和MondrianProperties兩個類里。
posted on 2007-06-14 14:51
扭曲的鉛筆
閱讀(1410)
評論(1)
編輯
收藏
所屬分類:
BI
FeedBack:
#
re: Mondrian國際化
2007-12-12 17:16
ll
頂一下,謝謝正需要
回復
更多評論
新用戶注冊
刷新評論列表
只有注冊用戶
登錄
后才能發表評論。
網站導航:
博客園
IT新聞
Chat2DB
C++博客
博問
管理
相關文章:
Mondrian利用XMLA Provider及國際化實現
Mondrian+JPivot流程簡介(轉)
mondrian 如何使用xml存儲olap服務器的元數據(轉摘)
Mondrian國際化
OLAP基本的概念
Copyright ©2025 扭曲的鉛筆 Powered by:
博客園
模板提供:
滬江博客
主站蜘蛛池模板:
滨海县
|
驻马店市
|
太仆寺旗
|
汽车
|
邵武市
|
西安市
|
宁陵县
|
墨竹工卡县
|
阜城县
|
普陀区
|
革吉县
|
化州市
|
黎川县
|
青铜峡市
|
阜阳市
|
寻乌县
|
宜兰市
|
高州市
|
台北县
|
阜新市
|
化隆
|
右玉县
|
郑州市
|
陇川县
|
新疆
|
渝中区
|
潢川县
|
宾阳县
|
西昌市
|
顺义区
|
微博
|
石景山区
|
鸡西市
|
榆社县
|
仪陇县
|
随州市
|
克什克腾旗
|
孝义市
|
崇信县
|
涟源市
|
邵武市
|