対応するファイル形式#
Weblate supports a wide range of translation formats. Each format is slightly different and provides a different set of capabilities.
ヒント
アプリケーションで使うファイル形式を選択するときは、使用するツールキット/プラットフォームで実績のある形式を使用することをお勧めします。そうすれば、翻訳者は慣れ親しんだツールを追加で使用でき、プロジェクトに貢献する可能性が高まります。
- Android 文字列リソース
- Apple iOS 文字列
- アプリ ストアのメタデータ ファイル
- ARB ファイル
- CSV ファイル
- DTD ファイル
- Excel Open XML
- フラット化した XML ファイル
- Fluent 形式
- GNU gettext
- go-i18n JSON ファイル
- gotext JSON ファイル
- GWT プロパティ
- HTML ファイル
- i18next JSON files
- IDML 形式
- INI の翻訳
- Inno Setup INI の翻訳
- Java プロパティ
- Joomla の翻訳
- JSON ファイル
- Laravel PHP 文字列
- Weblate の設定
- mi18n 言語ファイル
- OpenDocument 形式
- PHP 文字列
- Qt Linguist .ts
- ResourceDictionary ファイル
- RESX .NET resource files
- Ruby YAML ファイル
- Stringsdict 形式
- 字幕ファイル
- TermBase eXchange 形式
- テキスト ファイル
- WebExtension JSON
- Windows RC ファイル
- XLIFF
- YAML ファイル
自動検出#
Weblate tries to detect file format during 翻訳プロジェクトとコンポーネントの追加. The detection might be wrong for different variants of the same serialization format (JSON, YAML, properties) or file encoding, so please verify that ファイル形式 is correct before creating the component.
翻訳の種類別の機能#
ファイル形式 |
ファイル種別 [1] |
複数形 [2] |
説明 [3] |
コンテキスト [4] |
文字列位置 [5] |
フラグ [8] |
追加の状態 [6] |
---|---|---|---|---|---|---|---|
バイリンガル |
yes |
yes |
yes |
yes |
yes [9] |
要編集 |
|
モノリンガル |
yes |
yes |
yes |
yes |
yes [9] |
要編集 |
|
両方 |
yes |
yes |
yes |
yes |
yes |
要編集、承認済 |
|
両方 |
no |
yes |
no |
no |
no |
||
モノリンガル |
no |
yes |
no |
no |
no |
||
モノリンガル |
yes |
yes |
no |
no |
no |
||
モノリンガル |
no |
yes |
no |
yes |
no |
||
両方 |
yes |
yes |
no |
yes |
yes |
要編集 |
|
モノリンガル |
yes |
yes [7] |
no |
no |
yes |
||
両方 |
no |
yes |
no |
no |
no |
||
モノリンガル |
no [10] |
yes |
no |
no |
no |
||
モノリンガル |
no |
no |
no |
no |
no |
||
モノリンガル |
yes |
no |
no |
no |
no |
||
モノリンガル |
yes |
yes |
no |
no |
no |
||
モノリンガル |
yes |
yes |
no |
yes |
no |
||
モノリンガル |
yes |
yes |
no |
no |
no |
||
モノリンガル |
yes |
yes |
no |
no |
no |
||
モノリンガル |
no |
yes |
no |
no |
yes |
||
モノリンガル |
no |
no |
no |
no |
yes |
||
両方 |
no |
yes |
yes |
yes |
no |
要編集 |
|
モノリンガル |
no |
no |
no |
no |
no |
||
モノリンガル |
yes |
no |
no |
no |
no |
||
モノリンガル |
no |
no |
no |
no |
no |
||
モノリンガル |
no |
no |
no |
no |
yes |
||
モノリンガル |
no |
yes |
no |
no |
no |
||
モノリンガル |
no |
yes |
yes |
yes |
no |
要編集 |
|
モノリンガル |
no |
no |
no |
no |
no |
||
モノリンガル |
no |
no |
no |
yes |
no |
||
モノリンガル |
no |
no |
no |
no |
no |
||
モノリンガル |
no |
no |
no |
no |
no |
||
モノリンガル |
no |
no |
no |
no |
no |
||
モノリンガル |
no |
no |
no |
no |
no |
||
モノリンガル |
no |
no |
no |
no |
no |
||
バイリンガル |
no |
yes |
no |
no |
yes |
||
モノリンガル |
no |
no |
no |
no |
no |
||
モノリンガル |
yes |
yes |
no |
no |
no |
||
モノリンガル |
no [11] |
yes |
no |
no |
no |
バイリンガル形式とモノリンガル形式#
モノリンガル と バイリンガル の両方の形式に対応しています。バイリンガル形式は一つのファイルの中に二つの言語、原文と翻訳文が保存されます(典型例は GNU gettext、XLIFF や Apple iOS 文字列)。一方、モノリンガル形式は文字列を ID で識別し、それぞれの言語のファイルには各 ID に対応するその言語への翻訳のみが含まれます(典型例は Android 文字列リソース)。ファイル形式によっては、どちらの形式にも使用されます。詳細は、下記の説明で確認してください。
モノリンガル ファイルを正しく使用するには、原文とともに翻訳する文字列の完全なリストを含むファイルを編集することが必要です。このファイルは、Weblate 内では モノリンガル用の、基礎となる言語ファイル と呼ばれますが、命名は項目により変化することがあります。
さらに 中間言語ファイル を使用して、開発者が提供するが、最終的には使われない文字列を組み込むようにワークフローを拡張できます。
翻訳フラグ#
Translation flags allow customizing Weblate behavior. Some formats support defining those in the translation file (you can always define them in the Weblate interface, see フラグを使用した動作の設定).
This feature is modelled on flags in GNU gettext.
Additionally, for all XML based format, the flags are extracted from the
non-standard attribute weblate-flags
. Additionally max-length:N
is
supported through the maxwidth
attribute as
defined in the XLIFF standard, see 翻訳フラグの指定.
Pluralized strings#
Plurals are necessary to properly localize strings with variable count. The rules depend on a target language and many formats follow CLDR specification for that.
ヒント
Pluralizing strings need proper support from the application framework as well. Choose native format of your platform such as GNU gettext, Android 文字列リソース or Stringsdict 形式.
翻訳禁止の文字列#
バージョン 3.10 で追加.
翻訳ファイル中の翻訳禁止の文字列は Weblate に読み込まれますが、編集はできません。この機能はいくつかのフォーマット(XLIFF および Android 文字列リソース)では公式に対応していますが、その他のフォーマットでは read-only
フラグを追加して再現しています(参照: フラグを使用した動作の設定)。
他の形式への対応#
ほとんどの、translate-toolkit に対応するファイル形式では、シリアル化への対応は簡単にできます。(まだ)テストはしていませんが。多くの場合は、translate-toolkit ストレージの動作の違いに対応するため、Weblate に対応させるプログラムの実装が必要です。
新しいファイル形式に対応するには、まず translate-toolkit に対応するプログラムから実装すべきです。