顯示具有 多語系 標籤的文章。 顯示所有文章
顯示具有 多語系 標籤的文章。 顯示所有文章

2012年8月14日 星期二

【Flex】Using resource bundles

We know in flex,we will define different property file in different locale folder,usually we can get string by key as below:

   1: hello=Hello



   2: you=You






   1: hello=你好



   2: you=你




In actionscript3 we will use resourceManager.getString('locale',’hello')  set to the value.



and in mxml we will use text="@Resource(key='hello', bundle='locale')" set to value



If we embed the assets in flash(fla),and wanna retrieive the asset by symbol,we will define our property as below:





   1: betarea=Embed(source="./assets/assets.swf", symbol="asset.MySymbol")






   1: betarea=Embed(source="./assets/assets.swf", symbol="asset.MySymbolTW")




In actionscript3 we will use resourceManager.getObject('locale',’betarea') set to the value



and in mxml we will use source="@Resource(key='betarea', bundle='locale')" set to the value



If we define a class by actionscript3 or mxml for customized component and customized skin,we will define our property as below:







   1: entertable=ClassReference("com.leon456.skin.EnterTableSkin")






   1: entertable=ClassReference("com.leon456.skin.EnterTableSkinTW")




In actionscript3 we will use resourceManager.getObject('locale',’betarea') set to the value



and in mxml we will use skinClass="@Resource(key='entertable', bundle='baccaratmoduleui')" set to the value

2011年2月14日 星期一

Flex i18n

不小心被我誤刪了
有機會再來補

2009年3月22日 星期日

WordPress 多語系

最近在幫User找WordPress多語系問題
找了一下使用 xlanguage plug-in應該可以解決這個問題
http://wordpress.org/extend/plugins/xlanguage/
下載好了xlanguage後解壓到 [WordPress安裝目錄]\wp-content\plugins下
再進入管理者介面後在Setting就會出現這個plugin的選項











點選進入後最主要的是就是 Language及Lauguage這二個項目












設好各個語系的名稱及Locale後
在新增或編寫文章時使用編輯器右上方的1、2、3.....
做不同語系的設定














看一下html,原來是使用了在tag上加上attribute的做法來逹到多語系
(註:可以考慮用在Java的作法哦,以往接觸到的i18N都只有LABEL有多語系)











最後再點 Apperance的Widgets









再把xlanguage加到畫面上就完工了
完成如下所示
繁體:












簡體:












英文:













考慮把這邊的內容搬到WordPress平台ing.......