すべてのファイルは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テキストリソース — .resxのテキストコンパニオンとして使われるフラットkey=valueペア。
Greeting=Hello, world!Goodbye=See you laterNotFound=The resource you requested was not found.往復保証
テストスイートは、あらゆるフォーマットの代表的なフィクスチャーについてバイト単位の往復トリップを検証します。もしコードベース内でフォーマットのクワークがループして壊れた場合は、最小限のサンプルで問題を開けてくださいしてください。