Personalización del idioma

De MoodleDocs
note icon.png Existe documentación diferente para varias versiones de Moodle: Esta documentación es para Moodle 3.1 y más recientes, pero existe una página antigua en 29/Personalización del idioma.


Cambiar palabras o frases

Las palabras o frases (en cualquier idioma) usadas en el sitio pueden ser cambiadas fácilmente por un administrador empleando la característica de personalización del idioma. Por ejemplo, usted podría querer cambiar la palabra "Curso" por "Unidad de aprendizaje".

  1. Vaya a Adminitración del sitio > Idioma > Personalización del idioma y elija el idioma que desea personalizar.
  2. Haga click en el botón para 'Abrir el paquete de idioma para editarlo', lo cual puede tardarse bastante tiempo en procesar.
  3. Una vez que se haya cargado el paquete de idioma, haga click en el botón para 'Continuar'.
  4. Encuentre la cadena de caracteres que desea personalizar empleando las configuraciones para filtrar, después haga click en "Mostrar cadenas". Vea debajo para los detalles acerca del cómo encontrar el componente y el identificador de la cadena.
  5. Haga los cambios en la caja de "Personalización local".
  6. Haga click en "Aplicar cambios y continuar editando" si es que desea usar otro filtro o desea editar otros archivos; en caso contrario haga click en "Guardar cambios en el paquete de idioma" para guardar todos los cambios que Usted haya hecho.

Encontrar el componente y el identificador de cadena

Nota: Urgente de Traducir. ¡ Anímese a traducir esta muy importante página !.     ( y otras páginas muy importantes que urge traducir)


Finding the component and string identifier

Lang string origins
  1. Go to Site administration > Development > Debugging.
  2. Tick the 'Show origin of languages strings' tickbox then save changes.
  3. Go to the page containing the string you want to customise and in the address bar, append the following to the URL: either
    ?strings=1
    or
    &strings=1
    (depending whether there is already a parameter).
  4. Reload the page.

The page will then be displayed with component and string identifies in curly brackets after each string, for example "{rememberusername/admin}". The first part, before the /, is the string identifier. The last part is the component e.g admin.php. If there is nothing after the / then the string is in moodle.php.

Filter settings

Language filter
  • Show strings of these components - Click or Ctrl+click to select one or more files.
  • Customised only - tick the box to display only those strings that are already present in your xx_local pack.
  • Help only' - tick the box to display only help strings, that is the texts used when clicking the yellow question mark icon.
  • Modified only - tick the box to display only the strings that are modified since the last checked in string into the language pack.
  • Only strings containing - insert a phrase that must appear in the string. For example, if you put a word 'student' here, you will get only those strings that contain this word.
  • String identifier - see above.

Local customisation highlighting

  • Customised strings (already saved in a file) are highlighted in green.
  • Modified strings (not saved in a file yet) are highlighted in blue.
  • Customised strings for deletion are highlighted in red.

More about language packs

Moodle is translated into many languages - see Language packs for Moodle 3.1 for their list and the translation completion status. The translations are distributed as language packages (or just lang packs) that are maintained by kind volunteers, community contributors and Moodle Partners.

Moodle site administrators can customise any language pack to fit their individual needs. Editing the language pack files directly is not recommended, since any changes would be silently overwritten during the next upgrade. Instead, you should use the language customisation feature, which automatically creates a local language pack that holds all your changes from the official pack.

Local language packs have the same structure as official ones. They are saved in your Moodle data directory in moodledata/lang/xx_local/ folder where 'xx' is the code of the language. You have to have the official language pack installed before you can customise it. A local language pack should contain just strings you have customised - there is no need to create a copy of a whole official language pack.

When displaying a string, Moodle first looks whether a local customisation exists in moodledata/lang/xx_local/component_file.php. If so, it is used. If not, the string from the official language pack is used. (If the string has not been translated yet, the original English version is displayed). Please note that the strings are cached for better performance so if you modify a file directly in your xx_local pack then you will have to purge Moodle caches afterwards. Caches are purged automatically when using the language customisation feature.

Workflow of the language customisation (click to enlarge)


Como hacer un Respaldo y Restauración de un paquete de idioma personalizado

Esto es útil cuando Usted ha realizado personalizaciones a su paquete de idioma y desea instalar estos cambios en otro servidor.

Si Usted personaliza un paquete de idioma xx, la única carpeta que Usted necesita respaldar es $CFG->dataroot/lang/xx_local. Todas las demás carpetas que no tengan el sufijo _local son Paquetes de idioma estándar que pueden ser instalados y desinstalados desde la herramienta administrativa.

Una vez que se restaura esta carpeta en otro servidor, Usted tiene que purgar las cachés manualmente y permitirle al gestor de cadenas de texto integrado en Moodle que re-lea las carpetas *_local y que comience a usarlas.

Sharing a language customisation

  • If you have made a language customisation for a specific need, which is shared by other people (e.g. a kids version of your national language, intended for your school, but also useful for other schools), please consider sharing it as a child language in AMOS.
  • If your country uses a language that is not exactly the same as an existing language pack listed in the translation credits, and you have made a customisation that better suits the needs of your fellow country Moodle users, you might want to consider starting a child language pack in AMOS (e.g. Canadian French, which has over 1000 changes from the French parent language).

In either case, contact the parent language pack maintainer listed in the translation credits and/or our translation coordinator, Koen, translation@moodle.org.

Troubleshooting

Error en la BasedeDatos

Database error while language customization.png If you encounter a database error when you try to customise a language pack, then it may be due to a recent plugin that corrupted the database. You are advised to check all plugins recently added to your site, and check whether removing a plugin prevents this error. If that is the case, please contact the maintainer for the involved plugin and report the error. Most cases seen in 2013 were fixed by the maintainers of those plugins. One case seen in 2014 was related to the Essential (additional) theme and language packs other than English; it was caused by a a bug with the notification language handling, and was fixed with a plugin update.

O, Usted puede hacer una consulta a la Base de Datos de su servidor para rastrear al plugin que causa el problema.

Vea también

¿Preguntas?

Por favor publíquelas en idioma inglés en el https://moodle.org/mod/forum/view.php?id=43 Languages forum] en moodle.org.

Vea también