対応するファイル形式

Weblate は translate-toolkit で扱えるほとんどの翻訳フォーマットに対応していますが、ファイル形式ごとに細かな違いがあり、テストが不十分なファイル形式では問題が発生することがあります。

注釈

アプリケーションのファイル形式を選択するときは、使用するツールキット/プラットフォームで実績のある形式を使用することをお勧めします。そうすれば、翻訳者は慣れ親しんだツールを追加で使用でき、プロジェクトに貢献する可能性が高まります。

バイリンガル形式とモノリンガル形式

モノリンガル と バイリンガル の両方の形式に対応しています。バイリンガル形式は一つのファイルの中に二つの言語、原文と翻訳文が保存されます(典型例は GNU gettextXLIFFApple iOS strings)。一方、モノリンガル形式は文字列を ID で識別し、それぞれの言語のファイルには各 ID に対応するその言語への翻訳のみが含まれます(典型例は Android string resources)。ファイル形式によっては、両方の形式で使用します。詳細は、下記の説明を確認してください。

モノリンガル ファイルを正しく使用するには、原文とともに翻訳する文字列の完全なリストを含むファイルを操作することが必要です。このファイルは、Weblate 内では モノリンガル用の基準の言語ファイル と呼ばれますが、名前を変更することができます。

さらに、このワークフローは、中間言語ファイル を使用して、開発者が提供する文字列を含むように拡張できますが、最終的な文字列としては使用できません。

自動検出

Weblate は、広く普及しているファイル形式などを自動的に検出できますが、この検出機能によって性能が低下したり、特定のファイル形式よっては、特化した機能(新しい翻訳の自動追加など)が制限されます。

翻訳の種類別の機能

ファイル形式が対応するすべての機能:

ファイル形式

ファイル種別 1

複数形 2

説明 3

付随情報 4

文字列位置 5

フラグ 8

追加の状態 6

GNU gettext

バイリンガル

yes

yes

yes

yes

yes 9

要編集

モノリンガルの gettext

モノリンガル

yes

yes

yes

yes

yes 9

要編集

XLIFF

両方

yes

yes

yes

yes

yes 10

要編集、承認済

Java properties

両方

no

yes

no

no

no

mi18n lang ファイル

モノリンガル

no

yes

no

no

no

GWT プロパティ

モノリンガル

yes

yes

no

no

no

Joomla translations

モノリンガル

no

yes

no

yes

no

Qt Linguist .ts

両方

yes

yes

no

yes

yes 10

要編集

Android string resources

モノリンガル

yes

yes 7

no

no

yes 10

Apple iOS strings

バイリンガル

no

yes

no

no

no

PHP 文字列

モノリンガル

no 11

yes

no

no

no

JSON files

モノリンガル

no

no

no

no

no

JSON i18next files

モノリンガル

yes

no

no

no

no

go-i18n JSON files

モノリンガル

yes

no

no

no

no

ARB File

モノリンガル

yes

yes

no

no

no

WebExtension JSON

モノリンガル

yes

yes

no

no

no

.XML resource files

モノリンガル

no

yes

no

no

yes 10

CSV files

両方

no

yes

yes

yes

no

要編集

YAML files

モノリンガル

no

yes

no

no

no

Ruby YAML files

モノリンガル

yes

yes

no

no

no

DTD files

モノリンガル

no

no

no

no

no

Flat XML files

モノリンガル

no

no

no

no

yes 10

Windows RC files

モノリンガル

no

yes

no

no

no

Excel Open XML

モノリンガル

no

yes

yes

yes

no

要編集

アプリ ストア メタデータ ファイル

モノリンガル

no

no

no

no

no

Subtitle files

モノリンガル

no

no

no

yes

no

HTML ファイル

モノリンガル

no

no

no

no

no

OpenDocument Format

モノリンガル

no

no

no

no

no

IDML Format

モノリンガル

no

no

no

no

no

INI translations

モノリンガル

no

no

no

no

no

Inno Setup INI の翻訳

モノリンガル

no

no

no

no

no

TermBase eXchange 形式

バイリンガル

no

yes

no

no

yes 10

テキストファイル

モノリンガル

no

no

no

no

no

Stringsdict 形式

モノリンガル

yes

yes

no

no

no

Fluent 形式

モノリンガル

no 12

yes

no

no

no

1

参照: バイリンガル形式とモノリンガル形式

2

複数形は、数の値を持つ文字列を適切に現地語化するために必要です。

3

原文の説明を使用して、翻訳する文字列に関する追加情報を渡すことができます。

4

付随情報は、異なるスコープで使用される同一の文字列を区別するために使用します(例: 「Sun」は曜日の省略名として使用するか、太陽の名前として使用できます)。

5

ソースコード内の文字列の位置情報は、熟練した翻訳者が文字列の使用状況を把握する参考になります。

6

「未翻訳」と「翻訳済」に加えて、ファイル形式で対応する追加の状態。

7

<string> 要素の前に配置された XML コメントであり、原文の説明として解釈されます。

8

参照: フラグを使用した動作の設定

9(1,2)

gettext 型のコメントはフラグとして使用されます。

10(1,2,3,4,5,6)

フラグは、すべての XML のファイル形式の非標準の属性 weblate-flags から抽出されます。また、max-length:N は XLIFF 規格で定義されている maxwidth `属性<http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#maxwidth>`_ により対応しています。参照: Specifying translation flags

11

複数形は、文字列構文で定義する Laravel の場合にのみ対応しています。参照: Laravel での現地語化の方法

12

複数形は文字列の構文で処理され、Weblate では複数形として公開されません。

翻訳禁止の文字列

バージョン 3.10 で追加.

翻訳ファイルの翻訳禁止の文字列を含みますが、Weblate では編集できません。この機能は複数のフォーマット(XLIFF および Android string resources)には公式に対応していますが、その他のフォーマットでは read-only フラグを追加するとエミュレートできます。

GNU gettext

libre ソフトウェアの翻訳に最も広く使用されているフォーマット。

ファイルに保存されている付随情報は、ヘッダーを調整するか、対応する原文にリンクして対応します。

一般的なバイリンガルの gettext PO ファイル:

#: weblate/media/js/bootstrap-datepicker.js:1421
msgid "Monday"
msgstr "Pondělí"

#: weblate/media/js/bootstrap-datepicker.js:1421
msgid "Tuesday"
msgstr "Úterý"

#: weblate/accounts/avatar.py:163
msgctxt "No known user"
msgid "None"
msgstr "Žádný"

典型的な Weblate Component configuration

ファイルマスク

po/*.po

モノリンガル用の基準の言語ファイル

Empty(空)

新しい翻訳のテンプレート

po/messages.pot

ファイル形式

Gettext PO ファイル

モノリンガルの gettext

一部のプロジェクトでは、gettext をモノリンガル形式として使用することを定めています。ソースコード内の ID のみをコード化し、文字列を英語を含むすべての言語に翻訳することが必要です。これには対応していますが、コンポーネントを Weblate にインポートするときは、このファイル形式を明示的に選択することが必要です。

一般的なモノリンガルの gettext PO ファイル:

#: weblate/media/js/bootstrap-datepicker.js:1421
msgid "day-monday"
msgstr "Pondělí"

#: weblate/media/js/bootstrap-datepicker.js:1421
msgid "day-tuesday"
msgstr "Úterý"

#: weblate/accounts/avatar.py:163
msgid "none-user"
msgstr "Žádný"

一般的な基準の言語ファイル:

#: weblate/media/js/bootstrap-datepicker.js:1421
msgid "day-monday"
msgstr "Monday"

#: weblate/media/js/bootstrap-datepicker.js:1421
msgid "day-tuesday"
msgstr "Tuesday"

#: weblate/accounts/avatar.py:163
msgid "none-user"
msgstr "None"

典型的な Weblate Component configuration

ファイルマスク

po/*.po

モノリンガル用の基準の言語ファイル

po/en.po

新しい翻訳のテンプレート

po/messages.pot

ファイル形式

Gettext PO file (monolingual)

XLIFF

XML-based format created to standardize translation files, but in the end it is one of many standards, in this area.

XML Localization Interchange File Format (XLIFF) is usually used as bilingual, but Weblate supports it as monolingual as well.

参考

XML Localization Interchange File Format (XLIFF) specification

翻訳文の状態

バージョン 3.3 で変更: Weblate は、3.3リリース以前は state 属性を無視していました。

The state attribute in the file is partially processed and mapped to the "Needs edit" state in Weblate (the following states are used to flag the string as needing edit if there is a target present: new, needs-translation, needs-adaptation, needs-l10n). Should the state attribute be missing, a string is considered translated as soon as a <target> element exists.

If the translation string has approved="yes", it will also be imported into Weblate as "Approved", anything else will be imported as "Waiting for review" (which matches the XLIFF specification).

While saving, Weblate doesn't add those attributes unless necessary:

  • The state attribute is only added in case string is marked as needing edit.

  • The approved attribute is only added in case string has been reviewed.

  • In other cases the attributes are not added, but they are updated in case they are present.

That means that when using the XLIFF format, it is strongly recommended to turn on the Weblate review process, in order to see and change the approved state of strings.

Similarly upon importing such files (in the upload form), you should choose Import as translated under Processing of strings needing edit.

Whitespace and newlines in XLIFF

Generally types or amounts of whitespace is not differentiated between in XML formats. If you want to keep it, you have to add the xml:space="preserve" flag to the string.

例:

    <trans-unit id="10" approved="yes">
        <source xml:space="preserve">hello</source>
        <target xml:space="preserve">Hello, world!
</target>
    </trans-unit>

Specifying translation flags

You can specify additional translation flags (see フラグを使用した動作の設定) by using the weblate-flags attribute. Weblate also understands maxwidth and font attributes from the XLIFF specification:

<trans-unit id="10" maxwidth="100" size-unit="pixel" font="ubuntu;22;bold">
   <source>Hello %s</source>
</trans-unit>
<trans-unit id="20" maxwidth="100" size-unit="char" weblate-flags="c-format">
   <source>Hello %s</source>
</trans-unit>

The font attribute is parsed for font family, size and weight, the above example shows all of that, though only font family is required. Any whitespace in the font family is converted to underscore, so Source Sans Pro becomes Source_Sans_Pro, please keep that in mind when naming the font group (see フォントの管理).

文字列キー

Weblate identifies the units in the XLIFF file by resname attribute in case it is present and falls back to id (together with file tag if present).

The resname attribute is supposed to be human friendly identifier of the unit making it more suitable for Weblate to display instead of id. The resname has to be unique in the whole XLIFF file. This is required by Weblate and is not covered by the XLIFF standard - it does not put any uniqueness restrictions on this attribute.

Typical Weblate Component configuration for bilingual XLIFF

ファイルマスク

localizations/*.xliff

モノリンガル用の基準の言語ファイル

Empty(空)

新しい翻訳のテンプレート

localizations/en-US.xliff

ファイル形式

XLIFF Translation File

Typical Weblate Component configuration for monolingual XLIFF

ファイルマスク

localizations/*.xliff

モノリンガル用の基準の言語ファイル

localizations/en-US.xliff

新しい翻訳のテンプレート

localizations/en-US.xliff

ファイル形式

XLIFF Translation File

Java properties

Native Java format for translations.

Java properties are usually used as monolingual translations.

Weblate supports ISO-8859-1, UTF-8 and UTF-16 variants of this format. All of them support storing all Unicode characters, it is just differently encoded. In the ISO-8859-1, the Unicode escape sequences are used (for example zkou\u0161ka), all others encode characters directly either in UTF-8 or UTF-16.

注釈

Loading escape sequences works in UTF-8 mode as well, so please be careful choosing the correct encoding set to match your application needs.

典型的な Weblate Component configuration

ファイルマスク

src/app/Bundle_*.properties

モノリンガル用の基準の言語ファイル

src/app/Bundle.properties

新しい翻訳のテンプレート

Empty(空)

ファイル形式

Java Properties (ISO-8859-1)

mi18n lang ファイル

バージョン 4.7 で追加.

File format used for JavaScript localization by mi18n. Syntactically it matches Java properties.

典型的な Weblate Component configuration

ファイルマスク

*.lang

モノリンガル用の基準の言語ファイル

en-US.lang

新しい翻訳のテンプレート

Empty(空)

ファイル形式

mi18n lang ファイル

GWT プロパティ

Native GWT format for translations.

GWT properties are usually used as monolingual translations.

典型的な Weblate Component configuration

ファイルマスク

src/app/Bundle_*.properties

モノリンガル用の基準の言語ファイル

src/app/Bundle.properties

新しい翻訳のテンプレート

Empty(空)

ファイル形式

GWT Properties

INI translations

バージョン 4.1 で追加.

INI file format for translations.

INI translations are usually used as monolingual translations.

典型的な Weblate Component configuration

ファイルマスク

language/*.ini

モノリンガル用の基準の言語ファイル

language/en.ini

新しい翻訳のテンプレート

Empty(空)

ファイル形式

INI File

注釈

Weblate only extracts keys from sections within an INI file. In case your INI file lacks sections, you might want to use Joomla translations or Java properties instead.

Inno Setup INI の翻訳

バージョン 4.1 で追加.

翻訳用の Inno Setup INI ファイル形式。

Inno Setup INI の翻訳は、通常、モノリンガルの翻訳として使用されます。

注釈

The only notable difference to INI translations is in supporting %n and %t placeholders for line break and tab.

典型的な Weblate Component configuration

ファイルマスク

language/*.islu

モノリンガル用の基準の言語ファイル

language/en.islu

新しい翻訳のテンプレート

Empty(空)

ファイル形式

Inno Setup INI File

注釈

Only Unicode files (.islu) are currently supported, ANSI variant (.isl) is currently not supported.

Joomla translations

バージョン 2.12 で追加.

Native Joomla format for translations.

Joomla translations are usually used as monolingual translations.

典型的な Weblate Component configuration

ファイルマスク

language/*/com_foobar.ini

モノリンガル用の基準の言語ファイル

language/en-GB/com_foobar.ini

新しい翻訳のテンプレート

Empty(空)

ファイル形式

Joomla Language File

Qt Linguist .ts

Translation format used in Qt based applications.

Qt Linguist files are used as both bilingual and monolingual translations.

Typical Weblate Component configuration when using as bilingual

ファイルマスク

i18n/app.*.ts

モノリンガル用の基準の言語ファイル

Empty(空)

新しい翻訳のテンプレート

i18n/app.de.ts

ファイル形式

Qt Linguist Translation File

Typical Weblate Component configuration when using as monolingual

ファイルマスク

i18n/app.*.ts

モノリンガル用の基準の言語ファイル

i18n/app.en.ts

新しい翻訳のテンプレート

i18n/app.en.ts

ファイル形式

Qt Linguist Translation File

Android string resources

Android specific file format for translating applications.

Android の文字列のリソースはモノリンガルです。モノリンガル用の基準の言語ファイル は他のファイルとは異なる場所に保存されます -- res/values/strings.xml

典型的な Weblate Component configuration

ファイルマスク

res/values-*/strings.xml

モノリンガル用の基準の言語ファイル

res/values/strings.xml

新しい翻訳のテンプレート

Empty(空)

ファイル形式

Android String Resource

注釈

Android string-array structures are not currently supported. To work around this, you can break your string arrays apart:

<string-array name="several_strings">
    <item>First string</item>
    <item>Second string</item>
</string-array>

become:

<string-array name="several_strings">
    <item>@string/several_strings_0</item>
    <item>@string/several_strings_1</item>
</string-array>
<string name="several_strings_0">First string</string>
<string name="several_strings_1">Second string</string>

The string-array that points to the string elements should be stored in a different file, and not be made available for translation.

This script may help pre-process your existing strings.xml files and translations: https://gist.github.com/paour/11291062

Apple iOS strings

Apple specific file format for translating applications, used for both iOS and iPhone/iPad application translations.

Apple iOS strings are usually used as bilingual translations.

典型的な Weblate Component configuration

ファイルマスク

Resources/*.lproj/Localizable.strings

モノリンガル用の基準の言語ファイル

Resources/en.lproj/Localizable.strings or Resources/Base.lproj/Localizable.strings

新しい翻訳のテンプレート

Empty(空)

ファイル形式

iOS Strings (UTF-8)

PHP 文字列

PHP translations are usually monolingual, so it is recommended to specify a base file with (what is most often the) English strings.

Example file:

<?php
$LANG['foo'] = 'bar';
$LANG['foo1'] = 'foo bar';
$LANG['foo2'] = 'foo bar baz';
$LANG['foo3'] = 'foo bar baz bag';

典型的な Weblate Component configuration

ファイルマスク

lang/*/texts.php

モノリンガル用の基準の言語ファイル

lang/en/texts.php

新しい翻訳のテンプレート

lang/en/texts.php

ファイル形式

PHP strings

Laravel PHP 文字列

バージョン 4.1 で変更.

The Laravel PHP localization files are supported as well with plurals:

<?php
return [
    'welcome' => 'Welcome to our application',
    'apples' => 'There is one apple|There are many apples',
];

JSON files

バージョン 2.0 で追加.

バージョン 2.16 で変更: Since Weblate 2.16 and with translate-toolkit at-least 2.2.4, nested structure JSON files are supported as well.

バージョン 4.3 で変更: The structure of JSON file is properly preserved even for complex situations which were broken in prior releases.

JSON format is used mostly for translating applications implemented in JavaScript.

Weblate currently supports several variants of JSON translations:

JSON translations are usually monolingual, so it is recommended to specify a base file with (what is most often the) English strings.

Example file:

{
  "Hello, world!\n": "Ahoj světe!\n",
  "Orangutan has %d banana.\n": "",
  "Try Weblate at https://demo.weblate.org/!\n": "",
  "Thank you for using Weblate.": ""
}

Nested files are supported as well (see above for requirements), such a file can look like:

{
  "weblate": {
    "hello": "Ahoj světe!\n",
    "orangutan": "",
    "try": "",
    "thanks": ""
  }
}

ヒント

The JSON file and JSON nested structure file can both handle same type of files. Both preserve existing JSON structure when translating.

The only difference between them is when adding new strings using Weblate. The nested structure format parses the newly added key and inserts the new string into the matching structure. For example app.name key is inserted as:

{
   "app": {
      "name": "Weblate"
   }
}

典型的な Weblate Component configuration

ファイルマスク

langs/translation-*.json

モノリンガル用の基準の言語ファイル

langs/translation-en.json

新しい翻訳のテンプレート

Empty(空)

ファイル形式

JSON nested structure file

JSON i18next files

バージョン 2.17 で変更: Since Weblate 2.17 and with translate-toolkit at-least 2.2.5, i18next JSON files with plurals are supported as well.

i18next is an internationalization framework written in and for JavaScript. Weblate supports its localization files with features such as plurals.

i18next translations are monolingual, so it is recommended to specify a base file with (what is most often the) English strings.

注釈

Weblate は i18next JSON v3 形式に対応しています。v2 と v1 の違いは、複数形の処理方法を除いて、ほぼ互換性があります。

The v4 variant uses different approach for storing plurals and is currently not supported.

Example file:

{
  "hello": "Hello",
  "apple": "I have an apple",
  "apple_plural": "I have {{count}} apples",
  "apple_negative": "I have no apples"
}

典型的な Weblate Component configuration

ファイルマスク

langs/*.json

モノリンガル用の基準の言語ファイル

langs/en.json

新しい翻訳のテンプレート

Empty(空)

ファイル形式

i18next JSON file

go-i18n JSON files

バージョン 4.1 で追加.

go-i18n translations are monolingual, so it is recommended to specify a base file with (what is most often the) English strings.

注釈

Weblate supports the go-i18n JSON v1 format, for flat JSON formats please use JSON files. The v2 format with hash is currently not supported.

典型的な Weblate Component configuration

ファイルマスク

langs/*.json

モノリンガル用の基準の言語ファイル

langs/en.json

新しい翻訳のテンプレート

Empty(空)

ファイル形式

go-i18n JSON file

ARB File

バージョン 4.1 で追加.

ARB translations are monolingual, so it is recommended to specify a base file with (what is most often the) English strings.

典型的な Weblate Component configuration

ファイルマスク

lib/l10n/intl_*.arb

モノリンガル用の基準の言語ファイル

lib/l10n/intl_en.arb

新しい翻訳のテンプレート

Empty(空)

ファイル形式

ARB file

WebExtension JSON

バージョン 2.16 で追加: This is supported since Weblate 2.16 and with translate-toolkit at-least 2.2.4.

File format used when translating extensions for Mozilla Firefox or Google Chromium.

注釈

While this format is called JSON, its specification allows to include comments, which are not part of JSON specification. Weblate currently does not support file with comments.

Example file:

{
  "hello": {
    "message": "Ahoj světe!\n",
    "description": "Description",
    "placeholders": {
      "url": {
        "content": "$1",
        "example": "https://developer.mozilla.org"
      }
    }
  },
  "orangutan": {
    "message": "",
    "description": "Description"
  },
  "try": {
    "message": "",
    "description": "Description"
  },
  "thanks": {
    "message": "",
    "description": "Description"
  }
}

典型的な Weblate Component configuration

ファイルマスク

_locales/*/messages.json

モノリンガル用の基準の言語ファイル

_locales/en/messages.json

新しい翻訳のテンプレート

Empty(空)

ファイル形式

WebExtension JSON file

.XML resource files

バージョン 2.3 で追加.

A .XML resource (.resx) file employs a monolingual XML file format used in Microsoft .NET applications. It is interchangeable with .resw, when using identical syntax to .resx.

典型的な Weblate Component configuration

ファイルマスク

Resources/Language.*.resx

モノリンガル用の基準の言語ファイル

Resources/Language.resx

新しい翻訳のテンプレート

Empty(空)

ファイル形式

.NET resource file

参考

.NET Resource files (.resx)翻訳対象の言語ファイルの更新、ref:addon-weblate.cleanup.generic

CSV files

バージョン 2.4 で追加.

CSV files can contain a simple list of source and translation. Weblate supports the following files:

  • Files with header defining fields (location, source, target, ID, fuzzy, context, translator_comments, developer_comments). This is the recommended approach, as it is the least error prone. Choose CSV file as a file format.

  • Files with two fields—source and translation (in this order). Choose Simple CSV file as a file format.

  • Headerless files with fields in order defined by the translate-toolkit: location, source, target, ID, fuzzy, context, translator_comments, developer_comments. Choose CSV file as a file format.

  • Remember to define モノリンガル用の基準の言語ファイル when your files are monolingual (see バイリンガル形式とモノリンガル形式).

警告

The CSV format currently automatically detects the dialect of the CSV file. In some cases the automatic detection might fail and you will get mixed results. This is especially true for CSV files with newlines in the values. As a workaround it is recommended to omit quoting characters.

Example file:

Thank you for using Weblate.,Děkujeme za použití Weblate.

Typical Weblate Component configuration for bilingual CSV

ファイルマスク

locale/*.csv

モノリンガル用の基準の言語ファイル

Empty(空)

新しい翻訳のテンプレート

locale/en.csv

ファイル形式

CSV file

典型的なモノリンガル CSV 用の Weblate Component configuration

ファイルマスク

locale/*.csv

モノリンガル用の基準の言語ファイル

locale/en.csv

新しい翻訳のテンプレート

locale/en.csv

ファイル形式

シンプルな CSV ファイル

参考

CSV

YAML files

バージョン 2.9 で追加.

The plain YAML files with string keys and values. Weblate also extract strings from lists or dictionaries.

Example of a YAML file:

weblate:
  hello: ""
  orangutan": ""
  try": ""
  thanks": ""

典型的な Weblate Component configuration

ファイルマスク

translations/messages.*.yml

モノリンガル用の基準の言語ファイル

translations/messages.en.yml

新しい翻訳のテンプレート

Empty(空)

ファイル形式

YAML file

Ruby YAML files

バージョン 2.9 で追加.

Ruby i18n YAML files with language as root node.

Example Ruby i18n YAML file:

cs:
  weblate:
    hello: ""
    orangutan: ""
    try: ""
    thanks: ""

典型的な Weblate Component configuration

ファイルマスク

translations/messages.*.yml

モノリンガル用の基準の言語ファイル

translations/messages.en.yml

新しい翻訳のテンプレート

Empty(空)

ファイル形式

Ruby YAML file

参考

YAMLYAML files

DTD files

バージョン 2.18 で追加.

Example DTD file:

<!ENTITY hello "">
<!ENTITY orangutan "">
<!ENTITY try "">
<!ENTITY thanks "">

典型的な Weblate Component configuration

ファイルマスク

locale/*.dtd

モノリンガル用の基準の言語ファイル

locale/en.dtd

新しい翻訳のテンプレート

Empty(空)

ファイル形式

DTD file

Flat XML files

バージョン 3.9 で追加.

Example of a flat XML file:

<?xml version='1.0' encoding='UTF-8'?>
<root>
  <str key="hello_world">Hello World!</str>
  <str key="resource_key">Translated value.</str>
</root>

典型的な Weblate Component configuration

ファイルマスク

locale/*.xml

モノリンガル用の基準の言語ファイル

locale/en.xml

新しい翻訳のテンプレート

Empty(空)

ファイル形式

Flat XML file

参考

Flat XML

Windows RC files

バージョン 4.1 で変更: Support for Windows RC files has been rewritten.

注釈

Support for this format is currently in beta, feedback from testing is welcome.

Example Windows RC file:

LANGUAGE LANG_CZECH, SUBLANG_DEFAULT

STRINGTABLE
BEGIN
    IDS_MSG1                "Hello, world!\n"
    IDS_MSG2                "Orangutan has %d banana.\n"
    IDS_MSG3                "Try Weblate at http://demo.weblate.org/!\n"
    IDS_MSG4                "Thank you for using Weblate."
END

典型的な Weblate Component configuration

ファイルマスク

lang/*.rc

モノリンガル用の基準の言語ファイル

lang/en-US.rc

新しい翻訳のテンプレート

lang/en-US.rc

ファイル形式

RC file

アプリ ストア メタデータ ファイル

バージョン 3.5 で追加.

Metadata used for publishing apps in various app stores can be translated. Currently the following tools are compatible:

The metadata consists of several textfiles, which Weblate will present as separate strings to translate.

典型的な Weblate Component configuration

ファイルマスク

fastlane/android/metadata/*

モノリンガル用の基準の言語ファイル

fastlane/android/metadata/en-US

新しい翻訳のテンプレート

fastlane/android/metadata/en-US

ファイル形式

App store metadata files

ヒント

特定の文字列(例: changelogs)を翻訳させない場合は、翻訳禁止に設定します(参照: :ref:'custom-checks')。これは、 一括編集 を使用して自動化できます。

Subtitle files

バージョン 3.7 で追加.

Weblate は、さまざまな字幕ファイルを翻訳できます。

  • SubRip subtitle file (*.srt)

  • MicroDVD subtitle file (*.sub)

  • Advanced Substation Alpha subtitles file (*.ass)

  • Substation Alpha subtitle file (*.ssa)

典型的な Weblate Component configuration

ファイルマスク

ファイル パス/*.srt

モノリンガル用の基準の言語ファイル

ファイル パス/en.srt

新しい翻訳のテンプレート

ファイル パス/en.srt

ファイル形式

SubRip subtitle file

参考

Subtitles

Excel Open XML

バージョン 3.2 で追加.

Excel Open XML (.xlsx) files can be imported and exported.

When uploading XLSX files for translation, be aware that only the active worksheet is considered, and there must be at least a column called source (which contains the source string) and a column called target (which contains the translation). Additionally there should be the column called context (which contains the context path of the translation string). If you use the XLSX download for exporting the translations into an Excel workbook, you already get a file with the correct file format.

HTML ファイル

バージョン 4.1 で追加.

注釈

Support for this format is currently in beta, feedback from testing is welcome.

The translatable content is extracted from the HTML files and offered for the translation.

参考

HTML

テキストファイル

バージョン 4.6 で追加.

注釈

Support for this format is currently in beta, feedback from testing is welcome.

The translatable content is extracted from the plain text files and offered for the translation. Each paragraph is translated as a separate string.

この形式の 3 種類:

  • プレーンテキストファイル

  • DokuWiki テキストファイル

  • MediaWiki テキストファイル

OpenDocument Format

バージョン 4.1 で追加.

注釈

Support for this format is currently in beta, feedback from testing is welcome.

The translatable content is extracted from the OpenDocument files and offered for the translation.

IDML Format

バージョン 4.1 で追加.

注釈

Support for this format is currently in beta, feedback from testing is welcome.

The translatable content is extracted from the Adobe InDesign Markup Language files and offered for the translation.

TermBase eXchange 形式

バージョン 4.5 で追加.

TBX は、用語データーを交換するための XML 形式です。

典型的な Weblate Component configuration

ファイルマスク

tbx/*.tbx

モノリンガル用の基準の言語ファイル

Empty(空)

新しい翻訳のテンプレート

Empty(空)

ファイル形式

TermBase eXchange ファイル

Stringsdict 形式

バージョン 4.8 で追加.

注釈

Support for this format is currently in beta, feedback from testing is welcome.

XML based format used by Apple which is able to store plural forms of a string.

典型的な Weblate Component configuration

ファイルマスク

Resources/*.lproj/Localizable.stringsdict

モノリンガル用の基準の言語ファイル

Resources/en.lproj/Localizable.stringsdict or Resources/Base.lproj/Localizable.stringsdict

新しい翻訳のテンプレート

Empty(空)

ファイル形式

Stringsdict ファイル

Fluent 形式

バージョン 4.8 で追加.

注釈

Support for this format is currently in beta, feedback from testing is welcome.

Fluent is a monolingual text format that focuses on asymmetric localization: a simple string in one language can map to a complex multi-variant translation in another language.

典型的な Weblate Component configuration

ファイルマスク

locales/*/messages.ftl

モノリンガル用の基準の言語ファイル

locales/en/messages.ftl

新しい翻訳のテンプレート

Empty(空)

ファイル形式

Fluent ファイル

他の形式への対応

Most formats supported by translate-toolkit which support serializing can be easily supported, but they did not (yet) receive any testing. In most cases some thin layer is needed in Weblate to hide differences in behavior of different translate-toolkit storages.

To add support for a new format, the preferred approach is to first implement support for it in the translate-toolkit.