Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Maintaining a language pack: Difference between revisions

From MoodleDocs
(Placeholders must not be translated moved from Translation)
(wip template)
Line 1: Line 1:
{{Translation}}
{{Translation}}
{{Work in progress}}
Many thanks for your willingness to maintain a language pack.
Many thanks for your willingness to maintain a language pack.



Revision as of 15:35, 28 July 2014

Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on moodle.org or use the page comments.

Many thanks for your willingness to maintain a language pack.

The process of submitting translations to the language pack is as described in Contributing a translation except that in step 9 you are able to commit staged strings by adding a commit message and then clicking 'Commit and unstage all.'

Placeholders must not be translated

The following words, when enclosed within {curly brackets}, are placeholders for Moodle names of variables. They should not be translated, but must remain as they are within the curly brackets:

firstname, lastname, username, email, city, country, lang, timezone, mailformat, maildisplay, maildigest, htmleditor, ajax, autosubscribe , institution, department, idnumber, skype , msn, aim, yahoo, icq, phone1, phone2, address, url, description, descriptionformat, password, auth, oldusername , deleted, suspended, course1, course2, course3, course4

They must also be written exactly like this in all translations of the documentation pages (such as this page.) However, the documentation writer/translator might like to include a translation enclosed in brackets. For example, in the Spanish documentation pages you might find: password (contraseña).

The fact is: no placeholders can be translated in AMOS. There is no official list of "reserved" $a properties. Whatever xyz is put in {$a->xyz}, it must be kept as it is in AMOS.

Example:

26 AMOS fullnamedisplay core original.png

Must be (in this case, when translated into Mexican Spanish):

26 AMOS fullnamedisplay core.png

unless your language uses lastname before the firstname, as Japanese does, which translates to:

26 AMOS fullnamedisplay core Japanese.png

Translating strings offline

You can use the Language customisation tool in your local Moodle server to enhance the translation of language strings for the Moodle core files. If you want to translate the strings of a particular plugin, you must have that plugin installed in your server first. Your translated files will be located inside the local language folder in your Moodle server. You can upload these file to AMOS, one file at a time, or zip many files and upload the zip file (which will be un-zipped automatically inside AMOS).

Uploading a file of translations

To avoid making changes one by one, you can do your translations offline (as above) and upload them to AMOS.

  1. Click 'Stage' in the Navigation block.
  2. Choose 'Import translated strings from file'.
  3. Dag and drop the file.
  4. Click the 'Import' button.
  • Note: You can import several files at once if you zip them first and upload the zip file. The zip file is not allowed to contain any folders, only files.

See also