诸文件皆用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
详见更多微軟MUI文本資源——平面key=value對,作為.resx之文本伴侶。
Greeting=Hello, world!Goodbye=See you laterNotFound=The resource you requested was not found.往返保障
測試套件驗證各格式代表性固定之字節逐字節往返。 若代码库中格式怪异失常,请以极简样本开启议题。