Formatos de archivo admitidos#
Weblate supports a wide range of translation formats. Each format is slightly different and provides a different set of capabilities.
Consejo
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.
- Recursos de cadenas de Android
- Cadenas de iOS de Apple
- Archivos de metadatos de tiendas de aplicaciones
- Archivo ARB
- Archivos CSV
- DTD files
- Open XML de Excel
- Flat XML files
- Fluent format
- gettext de GNU
- Archivos JSON de go-i18n
- gotext JSON files
- Propiedades GWT
- Archivos HTML
- i18next JSON files
- Formato IDML
- Traducciones en INI
- Traducciones INI de Inno Setup
- Propiedades de Java
- Traducciones para Joomla
- Archivos JSON
- Cadenas PHP de Laravel
- Configuración de Weblate
- mi18n lang files
- Formato OpenDocument
- Cadenas de PHP
- .ts de Qt Linguist
- ResourceDictionary files
- RESX .NET resource files
- Ruby YAML files
- Stringsdict format
- Archivos de subtítulos
- TermBase eXchange format
- Archivos de texto
- JSON para WebExtension
- Archivos RC de Windows
- XLIFF
- YAML files
Ver también
Detección automática#
Weblate tries to detect file format during Añadir proyectos y componentes de traducción. The detection might be wrong for different variants of the same serialization format (JSON, YAML, properties) or file encoding, so please verify that Formato de archivo is correct before creating the component.
Translation types capabilities#
Formato |
Linguality [1] |
Plurales [2] |
Descriptions [3] |
Contexto [4] |
Ubicación [5] |
Flags [8] |
Estados adicionales [6] |
---|---|---|---|---|---|---|---|
bilingual |
yes |
yes |
yes |
yes |
yes [9] |
needs editing |
|
mono |
yes |
yes |
yes |
yes |
yes [9] |
needs editing |
|
both |
yes |
yes |
yes |
yes |
yes |
needs editing, approved |
|
both |
no |
yes |
no |
no |
no |
||
mono |
no |
yes |
no |
no |
no |
||
mono |
yes |
yes |
no |
no |
no |
||
mono |
no |
yes |
no |
yes |
no |
||
both |
yes |
yes |
no |
yes |
yes |
needs editing |
|
mono |
yes |
yes [7] |
no |
no |
yes |
||
both |
no |
yes |
no |
no |
no |
||
mono |
no [10] |
yes |
no |
no |
no |
||
mono |
no |
no |
no |
no |
no |
||
mono |
yes |
no |
no |
no |
no |
||
mono |
yes |
yes |
no |
no |
no |
||
mono |
yes |
yes |
no |
yes |
no |
||
mono |
yes |
yes |
no |
no |
no |
||
mono |
yes |
yes |
no |
no |
no |
||
mono |
no |
yes |
no |
no |
yes |
||
mono |
no |
no |
no |
no |
yes |
||
both |
no |
yes |
yes |
yes |
no |
needs editing |
|
mono |
no |
no |
no |
no |
no |
||
mono |
yes |
no |
no |
no |
no |
||
mono |
no |
no |
no |
no |
no |
||
mono |
no |
no |
no |
no |
yes |
||
mono |
no |
yes |
no |
no |
no |
||
mono |
no |
yes |
yes |
yes |
no |
needs editing |
|
mono |
no |
no |
no |
no |
no |
||
mono |
no |
no |
no |
yes |
no |
||
mono |
no |
no |
no |
no |
no |
||
mono |
no |
no |
no |
no |
no |
||
mono |
no |
no |
no |
no |
no |
||
mono |
no |
no |
no |
no |
no |
||
mono |
no |
no |
no |
no |
no |
||
bilingual |
no |
yes |
no |
no |
yes |
||
mono |
no |
no |
no |
no |
no |
||
mono |
yes |
yes |
no |
no |
no |
||
mono |
no [11] |
yes |
no |
no |
no |
Formatos bilingües y monolingües#
Both monolingual and bilingual formats are supported. Bilingual formats store two languages in single file—source and translation (typical examples are gettext de GNU, XLIFF or Cadenas de iOS de Apple). 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 Recursos de cadenas de Android). 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 Archivo de base monolingüe within Weblate, though the naming might vary in your paradigm.
Additionally this workflow can be extended by utilizing Archivo de idioma intermediario to include strings provided by developers, but not to be used as is in the final strings.
Indicadores de traducción#
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 Personalizar el comportamiento mediante indicadores).
This feature is modelled on flags in gettext de GNU.
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 Especificar indicadores de traducción.
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.
Consejo
Pluralizing strings need proper support from the application framework as well. Choose native format of your platform such as gettext de GNU, Recursos de cadenas de Android or Stringsdict format.
Cadenas de solo lectura#
Nuevo en la versión 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 Recursos de cadenas de Android), but can be emulated in others by adding a
read-only
flag, see Personalizar el comportamiento mediante indicadores.
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.
Ver también