所有檔案都用Name.<sourceLocale>.<ext>命名規則。
.resx
瞭解更多信息基於XML嘅.NET資源檔案。 翻譯每個<data><value>節點嘅內部文字,保留註解同元數據。
<?xml version="1.0" encoding="utf-8"?><root> <data name="Greeting" xml:space="preserve"> <value>Hello, world!</value> <comment>Shown on the home page</comment> </data> <data name="Goodbye" xml:space="preserve"> <value>See you later</value> </data></root>.xliff
瞭解更多信息OASIS XLIFF 2.0 文件。 翻譯每個<source>,並將結果寫入相應嘅<target>,並設定trgLang區域。
<?xml version="1.0" encoding="utf-8"?><xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="en"> <file id="ui"> <unit id="greeting"> <segment> <source>Hello, world!</source> </segment> </unit> </file></xliff>.po
瞭解更多信息GNU gettext 可攜式物件檔案。 將每個msgid/msgid_plural翻譯成msgstr/msgstr[n]形式。
msgid ""msgstr """Content-Type: text/plain; charset=UTF-8\n"
msgid "Hello, world!"msgstr ""
msgid "%d apple"msgid_plural "%d apples"msgstr[0] ""msgstr[1] "".json
瞭解更多信息任意嘅JSON檔案。 巢狀物件會用 [--] 分隔符平整,然後喺輸出時重新巢狀。 附點鍵("unit.dotted.key")係逐字保存嘅。
{ "app": { "title": "Resource Translator", "tagline": "Localize your repo on every commit" }, "buttons": { "save": "Save", "cancel": "Cancel" }}.ini
瞭解更多信息簡單嘅 key=value 檔案(Win32 風格嘅 INI 或者任何平面配置)。 章節標題同評論會被保留。
# Display strings[ui]greeting=Hello, world!goodbye=See you later
[errors]not_found=The resource you requested was not found..restext
瞭解更多信息Microsoft MUI 文字資源 — 平面 key=value 配對,用作 .resx 嘅文字輔助。
Greeting=Hello, world!Goodbye=See you laterNotFound=The resource you requested was not found.來回保證
測試套件會驗證代表性格式嘅 byte-byte 來回傳輸。 如果你嘅代碼庫入面有格式怪異嘅問題,請用最少嘅樣本開啟問題。