所有檔案皆使用 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.往返保證
測試套件會驗證各格式代表性固定器的位元組對位元組往返。如果你的程式碼庫中有格式怪異來回出錯,請用最少的樣本開啟問題。