Definiciones de idioma
Para presentar adecuadamente cada una de las traducciones, es necesario contar con información sobre el nombre del idioma, la dirección del texto, la definición de los plurales y el código de lengua.
Definiciones de idioma incorporadas
Definitions for about 600 languages are included in Weblate and the list is extended in every release. Whenever Weblate is upgraded (more specifically whenever weblate migrate is executed, see Instrucciones de actualización genéricas) the database of languages is updated to include all language definitions shipped in Weblate.
This feature can be disable using UPDATE_LANGUAGES
. You can also
enforce updating the database to match Weblate built-in data using
setuplang
.
Procesamiento de códigos de idioma
While parsing translations, Weblate attempts to map language code (usually the ISO 639-1 one) from the Máscara de archivos to any existing language object.
You can further adjust this mapping at project level by Alias de idiomas.
If no exact match can be found, an attempt will be made to best fit it into an existing language. Following steps are tried:
Búsquedas sin distinción de mayúsculas y minúsculas.
Normalización de guiones bajos y guiones.
Looking up built-in language aliases.
Búsqueda por nombre de idioma.
Ignoring the default country code for a given language—choosing
cs
instead ofcs_CZ
.
Should that also fail, a new language definition will be created using the
defaults (left to right text direction, one plural). The automatically created
language with code xx_XX
will be named as xx_XX (generated).
You might want to change this in the admin interface later, (see
Cambiar las definiciones de idioma) and report it to the issue tracker (see
Contribuir con Weblate), so that the proper definition can be added to the
upcoming Weblate release.
Consejo
In case you see something unwanted as a language, you might want to adjust Filtro de idioma to ignore such file when parsing translations.
Ver también
Cambiar las definiciones de idioma
Es posible cambiar las definiciones de idioma en la interfaz de idiomas (URL /languages/
).
While editing, make sure all fields are correct (especially plurals and text direction), otherwise translators will be unable to properly edit those translations.
Ambiguous language codes and macrolanguages
In many cases it is not a good idea to use macrolanguage code for a translation. The typical problematic case might be Kurdish language, which might be written in Arabic or Latin script, depending on actual variant. To get correct behavior in Weblate, it is recommended to use individual language codes only and avoid macrolanguages.
Ver también
Definiciones de idioma
Each language consists of following fields:
Código de idioma
Code identifying the language. Weblate prefers two letter codes as defined by ISO 639-1, but uses ISO 639-2 or ISO 639-3 codes for languages that do not have two letter code. It can also support extended codes as defined by BCP 47.
Nombre del idioma
Visible name of the language. The language names included in Weblate are also being localized depending on user interface language.
Dirección del texto
Determines whether language is written right to left or left to right. This property is autodetected correctly for most of the languages.
Plural number
Number of plurals used in the language.
Fórmula de plurales
Gettext compatible plural formula used to determine which plural form is used for given count.
Añadir traducciones nuevas
Distinto en la versión 2.18: In versions prior to 2.18 the behaviour of adding new translations was file format specific.
Weblate puede iniciar automáticamente traducciones nuevas en todos los formatos de archivo.
Some formats expect to start with an empty file and only translated strings to be included (for example Recursos de cadenas de Android), while others expect to have all keys present (for example gettext de GNU). The document-based formats (for example Formato OpenDocument) start with a copy of the source document and all strings marked as needing editing. In some situations this really doesn’t depend on the format, but rather on the framework you use to handle the translation (for example with Archivos JSON).
When you specify Plantilla para traducciones nuevas in Configuración de componentes, Weblate will use this file to start new translations. Any exiting translations will be removed from the file when doing so.
When Plantilla para traducciones nuevas is empty and the file format supports it, an empty file is created where new strings will be added once they are translated.
La opción Estilo de código de idioma le permite personalizar los códigos de idioma que se utilizarán en los nombres de archivo generados:
- Basado en el formato de archivo predefinido
Depende del formato de archivo; en la mayoría se utiliza POSIX.
- Estilo POSIX con guion bajo como separador
Typically used by gettext and related tools, produces language codes like
pt_BR
.- Estilo POSIX con guion bajo como separador; incluye el código de país
POSIX style language code including the country code even when not necessary (for example
cs_CZ
).- Estilo BCP con guion como separador
Typically used on web platforms, produces language codes like
pt-BR
.- Estilo BCP con guion como separador; incluye el código de país
BCP style language code including the country code even when not necessary (for example
cs-CZ
).- Estilo BCP que utiliza el guión como separador, códigos de idiomas heredados
Uses legacy codes for Chinese and BCP style notation.
- Estilo BCP con guión como separador, en minúsculas
BCP style notation, all in lower case (for example
cs-cz
).- Estilo de los metadatos de la tienda de aplicaciones
Style suitable for uploading metadata to appstores. This should be suitable for both Apple App Store and Google Play Store.
- Estilo Android
Only used in Android apps, produces language codes like
pt-rBR
.- Estilo Linux
Locales as used by Linux, uses legacy codes for Chinese and POSIX style notation.
Additionally, any mappings defined in Alias de idiomas are applied in reverse.
Nota
Weblate recognizes any of these when parsing translation files, the above settings only influences how new files are created.
Ver también