Unterstützte Dateiformate#
Weblate supports a wide range of translation formats. Each format is slightly different and provides a different set of capabilities.
Hinweis
When choosing a file format for your application, it’s better to stick some well established format in the toolkit/platform you use. This way your translators can additionally use whatever tools they are used to, and will more likely contribute to your project.
- Android String-Ressourcen
- Apple iOS-Zeichenketten
- App-Store-Metadatendateien
- ARB-Datei
- CSV-Dateien
- DTD-Dateien
- Excel Open XML
- Flat XML-Dateien
- Fluent-Format
- GNU gettext
- go-i18n-JSON-Dateien
- gotext-JSON-Dateien
- GWT-Eigenschaften
- HTML-Dateien
- i18next-JSON-Dateien
- IDML-Format
- INI-Übersetzungen
- Inno Setup INI-Übersetzungen
- Java-Eigenschaften
- Joomla-Übersetzungen
- JSON-Dateien
- Laravel PHP-Zeichenketten
- mi18n lang Dateien
- OpenDocument-Format
- PHP-Zeichenketten
- Qt Linguist .ts
- ResourceDictionary-Dateien
- RESX.NET-Ressourcendateien
- Ruby YAML-Dateien
- Stringsdict-Format
- Untertiteldateien
- TermBase eXchange-Format
- Textdateien
- WebExtension-JSON
- Windows RC-Dateien
- XLIFF
- YAML-Dateien
Siehe auch
Automatische Erkennung#
Weblate tries to detect file format during Adding translation projects and components. The detection might be wrong for different variants of the same serialization format (JSON, YAML, properties) or file encoding, so please verify that Dateiformat is correct before creating the component.
Fähigkeiten der Übersetzungstypen#
Format |
Lingualität [1] |
Pluralformen [2] |
Beschreibungen [3] |
Kontext [4] |
Ort [5] |
Markierungen [8] |
Zusätzliche Status [6] |
---|---|---|---|---|---|---|---|
zweisprachig |
ja |
ja |
ja |
ja |
ja [9] |
Bearbeitung erforderlich |
|
einsprachig |
ja |
ja |
ja |
ja |
ja [9] |
Bearbeitung erforderlich |
|
beides |
ja |
ja |
ja |
ja |
ja |
Bearbeitung erforderlich, genehmigt |
|
beides |
nein |
ja |
nein |
nein |
nein |
||
einsprachig |
nein |
ja |
nein |
nein |
nein |
||
einsprachig |
ja |
ja |
nein |
nein |
nein |
||
einsprachig |
nein |
ja |
nein |
ja |
nein |
||
beides |
ja |
ja |
nein |
ja |
ja |
Bearbeitung erforderlich |
|
einsprachig |
ja |
ja [7] |
nein |
nein |
ja |
||
beides |
nein |
ja |
nein |
nein |
nein |
||
einsprachig |
nein [10] |
ja |
nein |
nein |
nein |
||
einsprachig |
nein |
nein |
nein |
nein |
nein |
||
einsprachig |
ja |
nein |
nein |
nein |
nein |
||
einsprachig |
ja |
ja |
nein |
nein |
nein |
||
einsprachig |
ja |
ja |
nein |
ja |
nein |
||
einsprachig |
ja |
ja |
nein |
nein |
nein |
||
einsprachig |
ja |
ja |
nein |
nein |
nein |
||
einsprachig |
nein |
ja |
nein |
nein |
ja |
||
einsprachig |
nein |
nein |
nein |
nein |
ja |
||
beides |
nein |
ja |
ja |
ja |
nein |
Bearbeitung erforderlich |
|
einsprachig |
nein |
nein |
nein |
nein |
nein |
||
einsprachig |
ja |
nein |
nein |
nein |
nein |
||
einsprachig |
nein |
nein |
nein |
nein |
nein |
||
einsprachig |
nein |
nein |
nein |
nein |
ja |
||
einsprachig |
nein |
ja |
nein |
nein |
nein |
||
einsprachig |
nein |
ja |
ja |
ja |
nein |
Bearbeitung erforderlich |
|
einsprachig |
nein |
nein |
nein |
nein |
nein |
||
einsprachig |
nein |
nein |
nein |
ja |
nein |
||
einsprachig |
nein |
nein |
nein |
nein |
nein |
||
einsprachig |
nein |
nein |
nein |
nein |
nein |
||
einsprachig |
nein |
nein |
nein |
nein |
nein |
||
einsprachig |
nein |
nein |
nein |
nein |
nein |
||
einsprachig |
nein |
nein |
nein |
nein |
nein |
||
zweisprachig |
nein |
ja |
nein |
nein |
ja |
||
einsprachig |
nein |
nein |
nein |
nein |
nein |
||
einsprachig |
ja |
nein |
nein |
nein |
nein |
||
einsprachig |
no [11] |
ja |
nein |
nein |
nein |
Zweisprachige und einsprachige Formate#
Both monolingual and bilingual formats are supported. Bilingual formats store two languages in single file—source and translation (typical examples are GNU gettext, XLIFF or Apple iOS-Zeichenketten). On the other side, monolingual formats identify the string by ID, and each language file contains only the mapping of those to any given language (typically Android String-Ressourcen). Some file formats are used in both variants, see the detailed description below.
For correct use of monolingual files, Weblate requires access to a file containing complete list of strings to translate with their source—this file is called Einsprachige Basis-Sprachdatei within Weblate, though the naming might vary in your paradigm.
Additionally this workflow can be extended by utilizing Zwischensprachedatei to include strings provided by developers, but not to be used as is in the final strings.
Zeichenkettenstatus#
Many file formats only differentiate „Untranslated“ and „Translated“ strings. With some formats it is possible to store more fine-grained state information, such as „Needs editing“ or „Approved“.
Beschreibung der Ausgangszeichenkette#
Source string descriptions can be used to pass additional info about the string to translate.
Several formats have native support for providing additional info to translators (for example XLIFF, GNU gettext, WebExtension-JSON, CSV-Dateien, Excel Open XML, Qt Linguist .ts, go-i18n-JSON-Dateien, gotext-JSON-Dateien, ARB-Datei, RESX.NET-Ressourcendateien). Many other formats extract closest comment as source string description.
Erläuterung#
The Erläuterung on strings can be stored and parsed from a few file formats.
Currently supported only in TermBase eXchange-Format.
Ort der Ausgangszeichenkette#
Location of a string in source code might help proficient translators figure out how the string is used.
This information is typically available in bilingual formats where strings are extracted from the source code using tools. For example GNU gettext and Qt Linguist .ts.
Übersetzungsmarkierungen#
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 Anpassen des Verhaltens mit Markierungen).
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 Specifying translation flags.
Kontext#
Context is used to differentiate identical strings in a bilingual format used in different scopes (for example Sun can be used as an abbreviated name of the day „Sunday“ or as the name of our closest star).
For monolingual formats the string identifier (often called key) can serve the same purpose and additional context is not necessary.
Zeichenketten mit Pluralformen#
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.
Hinweis
Pluralizing strings need proper support from the application framework as well. Choose native format of your platform such as GNU gettext, Android String-Ressourcen or Stringsdict-Format.
Schreibgeschützte Zeichenketten#
Neu in Version 3.10.
Read-only strings from translation files will be included, but
can not be edited in Weblate. This feature is natively supported by few formats
(XLIFF and Android String-Ressourcen), but can be emulated in others by adding a
read-only
flag, see Anpassen des Verhaltens mit Markierungen.
Unterstützung anderer Formate#
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.
Siehe auch