Formats de fichiers pris en charge

Weblate prend en charge la plupart des formats de traduction compris par translate-toolkit, cependant chaque format étant légèrement différent, certains problèmes peuvent survenir avec des formats peu testés.

Note

Lorsque vous choisissez un format de fichier pour votre demande, il est préférable de conserver un format bien établi dans la boîte à outils/plateforme que vous utilisez. De cette façon, vos traducteurs pourront utiliser les outils auxquels ils sont habitués et contribueront plus probablement à votre projet.

Formats monolingues et bilingues

Les formats monolingual et bilingual sont pris en charge. Les formats bilingues stockent deux langues dans un seul fichier — source et traduction (exemples principaux GNU gettext, XLIFF ou Apple iOS strings). A l’opposé, les formats mono-langue identifient la chaîne par un identifiant, et chaque fichier de langue contient uniquement la traduction correspondante pour une langue donnée (exemple Android string resources). Certains formats de fichiers sont utilisés dans les deux variantes, veuillez consulter la description détaillée ci-dessous.

Pour une utilisation correcte des fichiers monolingues, Weblate nécessite l’accès à un fichier contenant la liste complète des chaînes de caractères à traduire avec leur source — ce fichier est appelé Fichier de langue de base mono-langue dans Weblate, bien que le nom puisse varier selon votre paradigme.

De plus, ce flux de travail peut être étendu en utilisant un Fichier de langue intermédiaire pour inclure des chaînes fournies par les développeurs, mais qui ne doivent pas être utilisées telles quelles dans les chaînes finales.

Détection automatique

Weblate peut détecter automatiquement plusieurs formats de fichiers répandus, mais cette détection peut nuire aux performances et limitera les fonctionnalités spécifiques à un format de fichier donné (par exemple l’ajout automatique de nouvelles traductions).

Fonctionnalités des types de traduction

Fonctionnalités de chacun des formats pris en charge :

Format

Type 1

Pluriels 2

Descriptions 3

Contexte 4

Emplacement 5

Drapeaux 8

États supplémentaires 6

GNU gettext

bilingue

oui

oui

oui

oui

oui 9

à vérifier

Gettext monolingue

monolingue

oui

oui

oui

oui

oui 9

à vérifier

XLIFF

les deux

oui

oui

oui

oui

oui 10

à vérifier, approuver

Java properties

les deux

non

oui

non

non

non

mi18n lang files

monolingue

non

oui

non

non

non

Propriétés GWT

monolingue

oui

oui

non

non

non

Joomla translations

monolingue

non

oui

non

oui

non

Qt Linguist .ts

les deux

oui

oui

non

oui

oui 10

à vérifier

Android string resources

monolingue

oui

oui 7

non

non

oui 10

Apple iOS strings

les deux

non

oui

non

non

non

Chaînes de caractères PHP

monolingue

non 11

oui

non

non

non

JSON files

monolingue

non

non

non

non

non

JSON i18next files

monolingue

oui

non

non

non

non

go-i18n JSON files

monolingue

oui

non

non

non

non

ARB File

monolingue

oui

oui

non

non

non

WebExtension JSON

monolingue

oui

oui

non

non

non

.XML resource files

monolingue

non

oui

non

non

oui 10

ResourceDictionary files

monolingue

non

non

non

non

oui 10

CSV files

les deux

non

oui

oui

oui

non

à vérifier

YAML files

monolingue

non

oui

non

non

non

Ruby YAML files

monolingue

oui

oui

non

non

non

DTD files

monolingue

non

non

non

non

non

Flat XML files

monolingue

non

non

non

non

oui 10

Windows RC files

monolingue

non

oui

non

non

non

Excel Open XML

monolingue

non

oui

oui

oui

non

à vérifier

Fichiers de métadonnées de l’App Store

monolingue

non

non

non

non

non

Subtitle files

monolingue

non

non

non

oui

non

HTML files

monolingue

non

non

non

non

non

OpenDocument Format

monolingue

non

non

non

non

non

IDML Format

monolingue

non

non

non

non

non

INI translations

monolingue

non

non

non

non

non

Traduction des fichier INI InnoSetup

monolingue

non

non

non

non

non

TermBase eXchange format

bilingue

non

oui

non

non

oui 10

Fichiers texte

monolingue

non

non

non

non

non

Stringsdict format

monolingue

oui

oui

non

non

non

Fluent format

monolingue

no 12

oui

non

non

non

1

Voir Formats monolingues et bilingues

2

Les pluriels sont nécessaires pour traduire correctement les chaînes de caractères à nombre variable.

3

Source string descriptions can be used to pass additional info about the string to translate.

4

Le contexte est utilisé pour différencier des chaînes identiques utilisées dans des endroits différents (par exemple Mer peut être utilisé comme abrégé de « mercredi » ou comme nom pour une étendue d’eau).

5

L’emplacement d’une chaîne dans le code source peut aider les traducteurs compétents à comprendre comment la chaîne est utilisée.

6

Additional states supported by the file format in addition to « Untranslated » and « Translated ».

7

XML comment placed before the <string> element, parsed as a source string description.

8

Voir Customizing behavior using flags

9(1,2)

Les commentaires de type gettext sont utilisés comme des drapeaux.

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

Les drapeaux sont extraits de l’attribut non standard weblate-flags pour tous les formats basés sur XML. En outre, l’attribut max-length:N est pris en charge à travers l’attribut maxwidth attribute tel que défini dans la norme XLIFF, voir Specifying translation flags.

11

Les pluriels ne sont pris en charge que pour Laravel qui les utilise dans la syntaxe des chaînes de caractères pour les définir, voir Localization in Laravel.

12

Plurals are handled in the syntax of the strings and not exposed as plurals in Weblate.

Chaînes en lecture seule

Nouveau dans la 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 resources), but can be emulated in others by adding a read-only flag, see Customizing behavior using flags.

GNU gettext

Format le plus largement utilisé pour la traduction des logiciels libres.

Les informations contextuelles stockées dans le fichier sont prises en charge en ajustant ses en-têtes ou en établissant des liens avec les fichiers sources correspondants.

Un fichier PO gettext bilingue ressemble généralement à ceci :

#: 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ý"

Configuration des composants typique de Weblate

Masque de fichier

po/*.po

Fichier de langue de base mono-langue

Vide

Modèle pour les nouvelles traductions

po/messages.pot

Format de fichier

Fichier gettext PO

Gettext monolingue

Certains projets décident d’utiliser gettext comme format monolingue — ils codifient uniquement les identifiants dans leur code source et la chaîne doit ensuite être traduite dans toutes les langues, y compris en anglais. Cela est pris en charge, mais il est nécessaire d’explicitement choisir ce format de fichier lors de l’importation du composant dans Weblate.

Un fichier gettext PO monolingue ressemble généralement à ceci :

#: 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ý"

Tandis que le fichier de langue de base ressemblera à ceci :

#: 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"

Configuration des composants typique de Weblate

Masque de fichier

po/*.po

Fichier de langue de base mono-langue

po/en.po

Modèle pour les nouvelles traductions

po/messages.pot

Format de fichier

Fichier gettext PO (monolingue)

XLIFF

Format basé sur XML créé pour normaliser les fichiers de traduction, mais en fin de compte, ce n’est qu’une des trop nombreuses normes du domaine.

XML Localization Interchange File Format (XLIFF) est généralement utilisé comme fichier bilingue, mais Weblate prend également en charge la version monolingue.

Weblate supporte le format XLIFF dans plusieurs variantes :

XLIFF translation file

Simple XLIFF file where content of the elements is stored as plain text (all XML elements being escaped).

XLIFF with placeables support

Standard XLIFF supporting placeables and other XML elements.

XLIFF with gettext extensions

XLIFF enriched by XLIFF 1.2 Representation Guide for Gettext PO to support plurals.

États de traduction

Modifié dans la version 3.3: Weblate ignored the state attribute prior to the 3.3 release.

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.

Voir aussi

Dedicated reviewers

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.

Par exemple :

    <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 Customizing behavior using flags) 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 Gestion des polices).

Clés de chaîne

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 Configuration des composants for bilingual XLIFF

Masque de fichier

localizations/*.xliff

Fichier de langue de base mono-langue

Vide

Modèle pour les nouvelles traductions

localizations/en-US.xliff

Format de fichier

XLIFF Translation File

Typical Weblate Configuration des composants for monolingual XLIFF

Masque de fichier

localizations/*.xliff

Fichier de langue de base mono-langue

localizations/en-US.xliff

Modèle pour les nouvelles traductions

localizations/en-US.xliff

Format de fichier

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.

Note

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

Configuration des composants typique de Weblate

Masque de fichier

src/app/Bundle_*.properties

Fichier de langue de base mono-langue

src/app/Bundle.properties

Modèle pour les nouvelles traductions

Vide

Format de fichier

Java Properties (ISO-8859-1)

mi18n lang files

Nouveau dans la version 4.7.

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

Configuration des composants typique de Weblate

Masque de fichier

*.lang

Fichier de langue de base mono-langue

en-US.lang

Modèle pour les nouvelles traductions

Vide

Format de fichier

mi18n lang file

Propriétés GWT

Native GWT format for translations.

GWT properties are usually used as monolingual translations.

Configuration des composants typique de Weblate

Masque de fichier

src/app/Bundle_*.properties

Fichier de langue de base mono-langue

src/app/Bundle.properties

Modèle pour les nouvelles traductions

Vide

Format de fichier

GWT Properties

INI translations

Nouveau dans la version 4.1.

INI file format for translations.

INI translations are usually used as monolingual translations.

Configuration des composants typique de Weblate

Masque de fichier

language/*.ini

Fichier de langue de base mono-langue

language/en.ini

Modèle pour les nouvelles traductions

Vide

Format de fichier

INI File

Note

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.

Traduction des fichier INI InnoSetup

Nouveau dans la version 4.1.

Format des fichiers Inno Setup INI pour les traductions.

Les traductions de fichiers Inno Setup INI sont généralement utilisées comme des traductions mono-langue.

Note

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

Configuration des composants typique de Weblate

Masque de fichier

language/*.islu

Fichier de langue de base mono-langue

language/en.islu

Modèle pour les nouvelles traductions

Vide

Format de fichier

Fichier INI InnoSetup

Note

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

Joomla translations

Nouveau dans la version 2.12.

Native Joomla format for translations.

Joomla translations are usually used as monolingual translations.

Configuration des composants typique de Weblate

Masque de fichier

language/*/com_foobar.ini

Fichier de langue de base mono-langue

language/en-GB/com_foobar.ini

Modèle pour les nouvelles traductions

Vide

Format de fichier

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 Configuration des composants when using as bilingual

Masque de fichier

i18n/app.*.ts

Fichier de langue de base mono-langue

Vide

Modèle pour les nouvelles traductions

i18n/app.de.ts

Format de fichier

Qt Linguist Translation File

Typical Weblate Configuration des composants when using as monolingual

Masque de fichier

i18n/app.*.ts

Fichier de langue de base mono-langue

i18n/app.en.ts

Modèle pour les nouvelles traductions

i18n/app.en.ts

Format de fichier

Qt Linguist Translation File

Android string resources

Android specific file format for translating applications.

Android string resources are monolingual, the Fichier de langue de base mono-langue is stored in a different location from the other files – res/values/strings.xml.

Configuration des composants typique de Weblate

Masque de fichier

res/values-*/strings.xml

Fichier de langue de base mono-langue

res/values/strings.xml

Modèle pour les nouvelles traductions

Vide

Format de fichier

Android String Resource

Note

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>

devient :

<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

Indication

To avoid translating some strings, these can be marked as non-translatable. This can be especially useful for string references:

<string name="foobar" translatable="false">@string/foo</string>

Apple iOS strings

File format typically used for translating Apple iOS applications, but also standardized by PWG 5100.13 and used on NeXTSTEP/OpenSTEP.

Apple iOS strings are usually used as monolingual.

Configuration des composants typique de Weblate

Masque de fichier

Resources/*.lproj/Localizable.strings

Fichier de langue de base mono-langue

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

Modèle pour les nouvelles traductions

Vide

Format de fichier

iOS Strings (UTF-8)

Chaînes de caractères 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';

Configuration des composants typique de Weblate

Masque de fichier

lang/*/texts.php

Fichier de langue de base mono-langue

lang/en/texts.php

Modèle pour les nouvelles traductions

lang/en/texts.php

Format de fichier

PHP strings

Chaînes de caractères PHP Laravel

Modifié dans la version 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

Nouveau dans la version 2.0.

Modifié dans la version 2.16: Since Weblate 2.16 and with translate-toolkit at-least 2.2.4, nested structure JSON files are supported as well.

Modifié dans la version 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": ""
  }
}

Indication

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"
   }
}

Configuration des composants typique de Weblate

Masque de fichier

langs/translation-*.json

Fichier de langue de base mono-langue

langs/translation-en.json

Modèle pour les nouvelles traductions

Vide

Format de fichier

JSON nested structure file

JSON i18next files

Modifié dans la version 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.

Note

Weblate supports the i18next JSON v3 format. The v2 and v1 variants are mostly compatible, with exception of how plurals are handled.

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"
}

Configuration des composants typique de Weblate

Masque de fichier

langs/*.json

Fichier de langue de base mono-langue

langs/en.json

Modèle pour les nouvelles traductions

Vide

Format de fichier

i18next JSON file

go-i18n JSON files

Nouveau dans la version 4.1.

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

Note

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.

Configuration des composants typique de Weblate

Masque de fichier

langs/*.json

Fichier de langue de base mono-langue

langs/en.json

Modèle pour les nouvelles traductions

Vide

Format de fichier

go-i18n JSON file

ARB File

Nouveau dans la version 4.1.

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

Configuration des composants typique de Weblate

Masque de fichier

lib/l10n/intl_*.arb

Fichier de langue de base mono-langue

lib/l10n/intl_en.arb

Modèle pour les nouvelles traductions

Vide

Format de fichier

ARB file

WebExtension JSON

Nouveau dans la version 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.

Note

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": "Orangutan has $coUnT$ bananas",
    "description": "Description",
    "placeholders": {
      "count": {
        "content": "$1",
        "example": "5"
      }
    }
  },
  "try": {
    "message": "",
    "description": "Description"
  },
  "thanks": {
    "message": "",
    "description": "Description"
  }
}

Configuration des composants typique de Weblate

Masque de fichier

_locales/*/messages.json

Fichier de langue de base mono-langue

_locales/en/messages.json

Modèle pour les nouvelles traductions

Vide

Format de fichier

WebExtension JSON file

.XML resource files

Nouveau dans la version 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.

Configuration des composants typique de Weblate

Masque de fichier

Resources/Language.*.resx

Fichier de langue de base mono-langue

Resources/Language.resx

Modèle pour les nouvelles traductions

Vide

Format de fichier

Fichier de ressource .Net

ResourceDictionary files

Nouveau dans la version 4.13.

ResourceDictionary is a monolingual XML file format used to package localizable string resources for Windows Presentation Foundation (WPF) applications.

Configuration des composants typique de Weblate

Masque de fichier

Languages/*.xaml

Fichier de langue de base mono-langue

Language/en.xaml

Modèle pour les nouvelles traductions

Vide

Format de fichier

ResourceDictionary file

CSV files

Nouveau dans la version 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 Fichier de langue de base mono-langue when your files are monolingual (see Formats monolingues et bilingues).

Indication

By default, the CSV format does autodetection of file encoding. This can be unreliable in some corner cases and causes performance penalty. Please choose file format variant with encoding to avoid this (for example CSV file (UTF-8)).

Avertissement

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.

Configuration des composants typique de Weblate pour les fichiers CSV bilingues

Masque de fichier

locale/*.csv

Fichier de langue de base mono-langue

Vide

Modèle pour les nouvelles traductions

locale/en.csv

Format de fichier

CSV file

Configuration des composants typique de Weblate pour les fichiers CSV monolingues

Masque de fichier

locale/*.csv

Fichier de langue de base mono-langue

locale/en.csv

Modèle pour les nouvelles traductions

locale/en.csv

Format de fichier

Fichier CSV simplifié

Multivalue CSV file

Nouveau dans la version 4.13.

This variant of the CSV files allows storing multiple translations per string.

Voir aussi

CSV

YAML files

Nouveau dans la version 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": ""

Configuration des composants typique de Weblate

Masque de fichier

translations/messages.*.yml

Fichier de langue de base mono-langue

translations/messages.en.yml

Modèle pour les nouvelles traductions

Vide

Format de fichier

YAML file

Voir aussi

YAML, Ruby YAML files

Ruby YAML files

Nouveau dans la version 2.9.

Ruby i18n YAML files with language as root node.

Example Ruby i18n YAML file:

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

Configuration des composants typique de Weblate

Masque de fichier

translations/messages.*.yml

Fichier de langue de base mono-langue

translations/messages.en.yml

Modèle pour les nouvelles traductions

Vide

Format de fichier

Ruby YAML file

Voir aussi

YAML, YAML files

DTD files

Nouveau dans la version 2.18.

Example DTD file:

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

Configuration des composants typique de Weblate

Masque de fichier

locale/*.dtd

Fichier de langue de base mono-langue

locale/en.dtd

Modèle pour les nouvelles traductions

Vide

Format de fichier

DTD file

Voir aussi

Mozilla DTD format

Flat XML files

Nouveau dans la version 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>

Configuration des composants typique de Weblate

Masque de fichier

locale/*.xml

Fichier de langue de base mono-langue

locale/en.xml

Modèle pour les nouvelles traductions

Vide

Format de fichier

Flat XML file

Voir aussi

Flat XML

Windows RC files

Modifié dans la version 4.1: Support for Windows RC files has been rewritten.

Note

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

Configuration des composants typique de Weblate

Masque de fichier

lang/*.rc

Fichier de langue de base mono-langue

lang/en-US.rc

Modèle pour les nouvelles traductions

lang/en-US.rc

Format de fichier

RC file

Voir aussi

Windows RC files

Fichiers de métadonnées de l’App Store

Nouveau dans la version 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.

Configuration des composants typique de Weblate

Masque de fichier

fastlane/android/metadata/*

Fichier de langue de base mono-langue

fastlane/android/metadata/en-US

Modèle pour les nouvelles traductions

fastlane/android/metadata/en-US

Format de fichier

App store metadata files

Indication

In case you don’t want to translate certain strings (for example changelogs), mark them read-only (see Customizing behavior using flags). This can be automated by the Modification en masse.

Subtitle files

Nouveau dans la version 3.7.

Weblate peut traduire divers fichiers de sous-titres :

  • SubRip subtitle file (*.srt)

  • MicroDVD subtitle file (*.sub)

  • Advanced Substation Alpha subtitles file (*.ass)

  • Substation Alpha subtitle file (*.ssa)

Configuration des composants typique de Weblate

Masque de fichier

path/*.srt

Fichier de langue de base mono-langue

path/en.srt

Modèle pour les nouvelles traductions

path/en.srt

Format de fichier

SubRip subtitle file

Voir aussi

Subtitles

Excel Open XML

Nouveau dans la version 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 files

Nouveau dans la version 4.1.

Note

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.

Voir aussi

HTML

Fichiers texte

Nouveau dans la version 4.6.

Note

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.

Il existe trois variantes de ce format :

  • Fichier texte brut

  • Fichier texte DokuWiki

  • Fichier texte MediaWiki

OpenDocument Format

Nouveau dans la version 4.1.

Note

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.

Voir aussi

OpenDocument Format

IDML Format

Nouveau dans la version 4.1.

Note

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 format

Nouveau dans la version 4.5.

TBX is an XML format for the exchange of terminology data.

Configuration des composants typique de Weblate

Masque de fichier

tbx/*.tbx

Fichier de langue de base mono-langue

Vide

Modèle pour les nouvelles traductions

Vide

Format de fichier

TermBase eXchange file

Stringsdict format

Nouveau dans la version 4.8.

Note

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.

Configuration des composants typique de Weblate

Masque de fichier

Resources/*.lproj/Localizable.stringsdict

Fichier de langue de base mono-langue

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

Modèle pour les nouvelles traductions

Vide

Format de fichier

Stringsdict file

Fluent format

Nouveau dans la version 4.8.

Note

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.

Configuration des composants typique de Weblate

Masque de fichier

locales/*/messages.ftl

Fichier de langue de base mono-langue

locales/en/messages.ftl

Modèle pour les nouvelles traductions

Vide

Format de fichier

Fluent file

Supporting other formats

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.