扭曲的鉛筆
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配置(上)(9441)
2.?SSO原理(轉摘)(4442)
3.?CAS SSO配置(下)(2813)
4.?Mondrian+JPivot流程簡介(轉)(2458)
5.?SiteMesh 過濾不裝飾的頁面(2443)
評論排行榜
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
扭曲的鉛筆
閱讀(1415)
評論(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:
博客園
模板提供:
滬江博客
主站蜘蛛池模板:
龙陵县
|
巩义市
|
万盛区
|
达日县
|
吉木乃县
|
贞丰县
|
揭西县
|
高碑店市
|
甘孜县
|
盐池县
|
伽师县
|
青河县
|
额济纳旗
|
和顺县
|
邯郸县
|
大荔县
|
德保县
|
壤塘县
|
丰城市
|
棋牌
|
大英县
|
郯城县
|
抚宁县
|
皋兰县
|
新密市
|
凤庆县
|
凤城市
|
青神县
|
黔东
|
晋江市
|
凭祥市
|
灵寿县
|
通榆县
|
广饶县
|
平顶山市
|
云安县
|
通江县
|
广汉市
|
万源市
|
阿坝县
|
望城县
|