<?xml version=”1.0″
encoding=”utf-8″?>
<root>
<!–
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
… ado.net/XML headers & schema …
<resheader
name=”resmimetype”>text/microsoft-resx</resheader>
<resheader name=”version”>2.0</resheader>
<resheader
name=”reader”>System.Resources.ResXResourceReader,
System.Windows.Forms, …</resheader>
<resheader
name=”writer”>System.Resources.ResXResourceWriter,
System.Windows.Forms, …</resheader>
<data name=”Name1″><value>this is my long
string</value><comment>this is a
comment</comment></data>
<data name=”Color1″ type=”System.Drawing.Color,
System.Drawing”>Blue</data>
<data name=”Bitmap1″
mimetype=”application/x-microsoft.net.object.binary.base64″>
<value>[base64 mime encoded
serialized .NET Framework object]</value>
</data>
<data name=”Icon1″ type=”System.Drawing.Icon,
System.Drawing”
mimetype=”application/x-microsoft.net.object.bytearray.base64″>
<value>[base64 mime encoded
string representing a byte array form of the .NET Framework
object]</value>
<comment>This is a
comment</comment>
</data>
There are any number of “resheader” rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don’t support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note – application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be
serialized with
:
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64
encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be
serialized with
:
System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64
encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be
serialized into a byte array
: using a
System.ComponentModel.TypeConverter
: and then encoded with base64
encoding.
–>
<xsd:schema id=”root” xmlns=””
xmlns:xsd=”http://www.w3.org/2001/XMLSchema”
xmlns:msdata=”urn:schemas-microsoft-com:xml-msdata”>
<xsd:import
namespace=”http://www.w3.org/XML/1998/namespace” />
<xsd:element name=”root”
msdata:IsDataSet=”true”>
<xsd:complexType>
<xsd:choice
maxOccurs=”unbounded”>
<xsd:element
name=”metadata”>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name=”value” type=”xsd:string” minOccurs=”0″
/>
</xsd:sequence>
<xsd:attribute
name=”name” use=”required” type=”xsd:string”
/>
<xsd:attribute name=”type”
type=”xsd:string” />
<xsd:attribute
name=”mimetype” type=”xsd:string” />
<xsd:attribute
ref=”xml:space” />
</xsd:complexType>
</xsd:element>
<xsd:element name=”assembly”>
<xsd:complexType>
<xsd:attribute
name=”alias” type=”xsd:string” />
<xsd:attribute
name=”name” type=”xsd:string” />
</xsd:complexType>
</xsd:element>
<xsd:element
name=”data”>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name=”value” type=”xsd:string” minOccurs=”0″
msdata:Ordinal=”1″ />
<xsd:element
name=”comment” type=”xsd:string” minOccurs=”0″
msdata:Ordinal=”2″ />
</xsd:sequence>
<xsd:attribute
name=”name” type=”xsd:string” use=”required”
msdata:Ordinal=”1″ />
<xsd:attribute
name=”type” type=”xsd:string”
msdata:Ordinal=”3″ />
<xsd:attribute
name=”mimetype” type=”xsd:string”
msdata:Ordinal=”4″ />
<xsd:attribute
ref=”xml:space” />
</xsd:complexType>
</xsd:element>
<xsd:element
name=”resheader”>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name=”value” type=”xsd:string” minOccurs=”0″
msdata:Ordinal=”1″ />
</xsd:sequence>
<xsd:attribute
name=”name” type=”xsd:string” use=”required”
/>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name=”resmimetype”>
<value>text/microsoft-resx</value>
</resheader>
<resheader name=”version”>
<value>2.0</value>
</resheader>
<resheader name=”reader”>
<value>System.Resources.ResXResourceReader,
System.Windows.Forms, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name=”writer”>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms,
Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name=”btn_AutoInterfereCode”
xml:space=”preserve”>
<value>
自動產生</value>
</data>
<data name=”btn_AutuUUID”
xml:space=”preserve”>
<value>
自動產生</value>
</data>
<data name=”btn_clear” xml:space=”preserve”>
<value>
重設表單</value>
</data>
<data name=”btn_exit” xml:space=”preserve”>
<value>
取消</value>
</data>
<data name=”btn_readCardInfo”
xml:space=”preserve”>
<value>
擷取卡片</value>
</data>
<data name=”btn_writeCardInfo”
xml:space=”preserve”>
<value>
寫入卡片</value>
</data>
<data name=”cb_Holiday”
xml:space=”preserve”>
<value>
啟用</value>
</data>
<data name=”cb_week00″ xml:space=”preserve”>
<value>
日</value>
</data>
<data name=”cb_week01″ xml:space=”preserve”>
<value>
一</value>
</data>
<data name=”cb_week02″ xml:space=”preserve”>
<value>
二</value>
</data>
<data name=”cb_week03″ xml:space=”preserve”>
<value>
三</value>
</data>
<data name=”cb_week04″ xml:space=”preserve”>
<value>
四</value>
</data>
<data name=”cb_week05″ xml:space=”preserve”>
<value>
五</value>
</data>
<data name=”cb_week06″ xml:space=”preserve”>
<value>
六</value>
</data>
<data name=”clear_Msg00″
xml:space=”preserve”>
<value>
請您再次確認是否清除畫面上所有資訊</value>
</data>
<data name=”clear_Msg01″
xml:space=”preserve”>
<value>
清除資料確認</value>
</data>
<data name=”DoorGroup01_Msg”
xml:space=”preserve”>
<value>
使用者目前沒有設定門區02資料,或語法格式錯誤請重新輸入謝謝。</value>
</data>
<data name=”DoorGroup02_Msg”
xml:space=”preserve”>
<value>
使用者目前沒有設定門區03資料,或語法格式錯誤請重新輸入謝謝。</value>
</data>
<data name=”DoorGroup03_Msg”
xml:space=”preserve”>
<value>
使用者目前沒有設定門區04資料,或語法格式錯誤請重新輸入謝謝。</value>
</data>
<data name=”DoorGroup_Msg”
xml:space=”preserve”>
<value>
使用者目前沒有設定門區01資料,或語法格式錯誤請重新輸入謝謝。</value>
</data>
<data name=”lab_01″ xml:space=”preserve”>
<value>
卡機設備:</value>
</data>
<data name=”lab_05″ xml:space=”preserve”>
<value>
自訂識別碼:</value>
</data>
<data name=”lab_06″ xml:space=”preserve”>
<value>
擾碼:</value>
</data>
<data name=”lab_07″ xml:space=”preserve”>
<value>
卡片類型:</value>
</data>
<data name=”lab_08″ xml:space=”preserve”>
<value>
卡片用途:</value>
</data>
<data name=”lab_09″ xml:space=”preserve”>
<value>
卡片有效期限:</value>
</data>
<data name=”lab_11″ xml:space=”preserve”>
<value>
周計畫:</value>
</data>
<data name=”lab_12″ xml:space=”preserve”>
<value>
假日通行:</value>
</data>
<data name=”lab_13″ xml:space=”preserve”>
<value>
可通行時段1:</value>
</data>
<data name=”lab_14″ xml:space=”preserve”>
<value>
可通行時段2:</value>
</data>
<data name=”lab_15″ xml:space=”preserve”>
<value>
可通行時段3:</value>
</data>
<data name=”lab_19″ xml:space=”preserve”>
<value>
門區群組01:</value>
</data>
<data name=”lab_20″ xml:space=”preserve”>
<value>
門區群組02:</value>
</data>
<data name=”lab_21″ xml:space=”preserve”>
<value>
門區群組03:</value>
</data>
<data name=”lab_22″ xml:space=”preserve”>
<value>
門區群組04:</value>
</data>
<data name=”read_Msg00″
xml:space=”preserve”>
<value>
請確認要讀取的卡片已經放在卡機上,謝謝。</value>
</data>
<data name=”read_Msg01″
xml:space=”preserve”>
<value>
卡片讀取完成,資料將呈現在畫面上。</value>
</data>
<data name=”read_Msg02″
xml:space=”preserve”>
<value>
等待:\n\n讀取卡片資訊,請稍後…</value>
</data>
<data name=”timer_Msg00″
xml:space=”preserve”>
<value>
等待: \n\n 尋找設備,請稍後…</value>
</data>
<data name=”write_Msg00″
xml:space=”preserve”>
<value>
請確認要寫入資料的卡片已經放在卡機上,謝謝。</value>
</data>
<data name=”write_Msg01″
xml:space=”preserve”>
<value>
等待:\n\n寫入卡片資訊,請稍後…</value>
</data>
<data name=”write_Msg02″
xml:space=”preserve”>
<value>
卡片寫入完成,若要確認正確性請重新讀取。</value>
</data>
<data name=”API_Msg00″ xml:space=”preserve”>
<value>
無法 SYRIS API 初始化\n程式即將關閉</value>
</data>
<data name=”ItemCardType00″
xml:space=”preserve”>
<value>
一般卡</value>
</data>
<data name=”ItemCardType01″
xml:space=”preserve”>
<value>VIP
卡</value>
</data>
<data name=”ItemCardType02″
xml:space=”preserve”>
<value>Admin
卡</value>
</data>
<data name=”ItemCardType03″
xml:space=”preserve”>
<value>
未定義卡</value>
</data>
<data name=”ItemCardUsage00″
xml:space=”preserve”>
<value>
一般門禁</value>
</data>
<data name=”ItemCardUsage01″
xml:space=”preserve”>
<value>
巡羅</value>
</data>
<data name=”ItemCardUsage02″
xml:space=”preserve”>
<value>
未定義</value>
</data>
<data name=”Select_Msg00″
xml:space=”preserve”>
<value>
選擇設備</value>
</data>
<data name=”Select_Msg01″
xml:space=”preserve”>
<value>\t
開啟成功</value>
</data>
<data name=”Select_Msg02″
xml:space=”preserve”>
<value>\t
開啟失敗</value>
</data>
<data name=”lab_23″ xml:space=”preserve”>
<value>
延伸資料:</value>
</data>
<data name=”lab_p001″ xml:space=”preserve”>
<value>
門區名稱:</value>
</data>
<data name=”lab_p002″ xml:space=”preserve”>
<value>
門區群組:</value>
</data>
<data name=”lab_p101″ xml:space=”preserve”>
<value>
個人密碼:</value>
</data>
<data name=”lab_p102″ xml:space=”preserve”>
<value>
門區群組:</value>
</data>
<data name=”lab_p201″ xml:space=”preserve”>
<value>
門區群組:</value>
</data>
<data name=”lab_p301″ xml:space=”preserve”>
<value>
門區群組01:</value>
</data>
<data name=”lab_p302″ xml:space=”preserve”>
<value>
門區群組02:</value>
</data>
<data name=”lab_p303″ xml:space=”preserve”>
<value>
門區名稱01:</value>
</data>
<data name=”lab_p304″ xml:space=”preserve”>
<value>
門區名稱02:</value>
</data>
<data name=”lab_p305″ xml:space=”preserve”>
<value>
個人密碼:</value>
</data>
<data name=”lab_p306″ xml:space=”preserve”>
<value>
門區名稱03:</value>
</data>
<data name=”lab_p401″ xml:space=”preserve”>
<value>
門區群組01:</value>
</data>
<data name=”lab_p402″ xml:space=”preserve”>
<value>
門區群組02:</value>
</data>
<data name=”lab_p403″ xml:space=”preserve”>
<value>
門區名稱01:</value>
</data>
<data name=”lab_p404″ xml:space=”preserve”>
<value>
門區群組03:</value>
</data>
<data name=”lab_p405″ xml:space=”preserve”>
<value>
門區群組04:</value>
</data>
<data name=”lab_p406″ xml:space=”preserve”>
<value>
門區群組05:</value>
</data>
<data name=”lab_p407″ xml:space=”preserve”>
<value>
門區名稱02:</value>
</data>
<data name=”lab_p408″ xml:space=”preserve”>
<value>
個人密碼:</value>
</data>
<data name=”lab_p501″ xml:space=”preserve”>
<value>
門區群組01:</value>
</data>
<data name=”lab_p502″ xml:space=”preserve”>
<value>
門區群組02:</value>
</data>
<data name=”lab_p503″ xml:space=”preserve”>
<value>
門區群組03:</value>
</data>
<data name=”lab_p504″ xml:space=”preserve”>
<value>
個人密碼:</value>
</data>
<data name=”lab_p505″ xml:space=”preserve”>
<value>
門區名稱:</value>
</data>
<data name=”lab_p601″ xml:space=”preserve”>
<value>
門區群組01:</value>
</data>
<data name=”lab_p602″ xml:space=”preserve”>
<value>
門區群組02:</value>
</data>
<data name=”lab_p603″ xml:space=”preserve”>
<value>
門區群組03:</value>
</data>
<data name=”lab_p604″ xml:space=”preserve”>
<value>
門區名稱01:</value>
</data>
<data name=”lab_p605″ xml:space=”preserve”>
<value>
門區名稱02:</value>
</data>
<data name=”lab_24″ xml:space=”preserve”>
<value>
語系:</value>
</data>
<data name=”timer_Msg01″
xml:space=”preserve”>
<value>
沒有偵測到設備,程式即將關閉。</value>
</data>
</root>
|
One thought on “C# 多國語系程式設計介紹”
資料來源:http://charleslin74.pixnet.net/blog/post/438910510-%5bandroid%5d-android%E5%A4%9A%E5%9C%8B%E8%AA%9E%E8%A8%80app%E7%9A%84%E5%81%9A%E6%B3%95%E5%8F%8A%E8%B3%87%E6%96%99%E5%A4%BE%E5%91%BD%E5%90%8D
新增對應目錄後,在目錄上按滑鼠右鍵->NEW->File ,新增一個檔案叫strings.xml
4.把你要用的字辭新增到這個檔案裡吧.
中文(台灣):values-zh-rTW
中文(中國):values-zh-rCN
中文(香港):values-zh-rHK
英語(美國):values-en-rUS
英語(英國):values-en-rGB
英文(澳大利亞):values-en-rAU
英文(加拿大):values-en-rCA
英文(愛爾蘭):values-en-rIE
英文(印度):values-en-rIN
英文(新西蘭):values-en-rNZ
英文(新加坡):values-en-rSG
英文(南非):values-en-rZA
阿拉伯文(埃及):values-ar-rEG
阿拉伯文(以色列):values-ar-rIL
保加利亞文: values-bg-rBG
加泰羅尼亞文:values-ca-rES
捷克文:values-cs-rCZ
丹麥文:values-da-rDK
德文(奧地利):values-de-rAT
德文(瑞士):values-de-rCH
德文(德國):values-de-rDE
德文(列支敦士登):values-de-rLI
希臘文:values-el-rGR
西班牙文(西班牙):values-es-rES
西班牙文(美國):values-es-rUS
芬蘭文(芬蘭):values-fi-rFI
法文(比利時):values-fr-rBE
法文(加拿大):values-fr-rCA
法文(瑞士):values-fr-rCH
法文(法國):values-fr-rFR
希伯來文:values-iw-rIL
印地文:values-hi-rIN
克羅里亞文:values-hr-rHR
匈牙利文:values-hu-rHU
印度尼西亞文:values-in-rID
意大利文(瑞士):values-it-rCH
意大利文(意大利):values-it-rIT
日文:values-ja-rJP
韓文:values-ko-rKR
立陶宛文:valueslt-rLT
拉脫維亞文:values-lv-rLV
挪威博克馬爾文:values-nb-rNO
荷蘭文(比利時):values-nl-BE
荷蘭文(荷蘭):values-nl-rNL
波蘭文:values-pl-rPL
葡萄牙文(巴西):values-pt-rBR
葡萄牙文(葡萄牙):values-pt-rPT
羅馬尼亞文:values-ro-rRO
俄文:values-ru-rRU
斯洛伐克文:values-sk-rSK
斯洛文尼亞文:values-sl-rSI
塞爾維亞文:values-sr-rRS
瑞典文:values-sv-rSE
泰文:values-th-rTH
塔加洛語:values-tl-rPH
土耳其文:values–r-rTR
烏克蘭文:values-uk-rUA
越南文:values-vi-rVN
做法如下
values-zh-rTW目錄裡的strings.xml
<resources>
<string name="alert">欄位不可為空白!!</string>
</resources>
values-zh-rCN目錄裡的strings.xml
<resources>
<string name="alert">栏位不可为空白!!</string>
</resources\>
在Android的程式裡取Strings.xml的值
getResources().getString(R.string.alert)
這樣Android會根據使用者設備的語系設定,自動去抓該語系的值來顯示.