Note:

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

Moodle App Translation: Difference between revisions

From MoodleDocs
(Document translating site plugins)
(redirect)
Tag: Replaced
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Translation}}
This page is now located in the user docs: [[:en:Translating the Moodle App|Translating the Moodle App]]
 
==Moodle App translations==
 
The Moodle App is being translated into more and more languages! Check out [https://moodle.org/plugins/translations.php?plugin=local_moodlemobileapp the latest translation stats].
 
==How do I translate words and phrases used in the Moodle App?==
 
To help with translating, you first need to create an account on the [http://lang.moodle.org Moodle translation site].
 
Moodle App strings may be found using this filter: https://lang.moodle.org/local/amos/view.php?t=1&c=*app&m=1
 
Just select the desired language and click "Show strings" to display them.
 
===Advanced selection of strings===
 
All strings used in the app are indexed in [https://github.com/moodlehq/moodleapp/blob/master/scripts/langindex.json the langindex.json file].
 
They have the following format:
 
* <code>"{module}.{string-identifier}": "{component}"</code> — In this case the string will be translated using the <code>{string-identifier}</code> on the <code>{component}</code> file.
* <code>"{module}.{string-identifier}": "{component}/{component-string}"</code> — In this case the string will be translated using the <code>{component-string}</code> on the <code>{component}</code> file.
 
 
Some examples are:
 
* <code>"addon.block_recentlyaccessedcourses.nocourses": "block_recentlyaccessedcourses"</code> — This means it will use the <code>nocourses</code> translation from the <code>block_recentlyaccessedcourses</code> component in AMOS.
* <code>"addon.mod_workshop.yourassessment": "workshop/assessmentbyyourself"</code> — This means it will use the <code>assessmentbyyourself</code> string from the </code>workshop</code> component in AMOS.
 
 
The <code>local_moodlemobileapp</code> component has the specific strings of the Moodle App, but most of the strings are located in other components. To select all the Moodle App strings, click on "Moodle App" below the components selector. This action will auto-select the following:
 
* Last version available option (it is selected by default). The propagation to other version is done automatically.
* Components used in the App.
* Only strings that are being used in the Moodle App: This will filter only the strings used in every component on the app.
 
 
Additionally, you will see a little mobile in the strings used in the app. Hovering over this icon, you can read the string identifier in the app.
 
==I am not a language pack maintainer. How can I contribute a translation?==
 
The process is the same as for core Moodle. See [[Contributing a translation]].
 
Note: Please contact the maintainer of your language pack as listed in the [http://lang.moodle.org/local/amos/credits.php Translation credits] to tell them that you are translating the Moodle App. If you don't receive a reply within a reasonable time, contact our Moodle translation coordinator, Koen Roggemans, at [mailto:translation@moodle.org translation@moodle.org].
 
==When will the translated strings be shown in the Moodle App?==
 
Translations are not automatically synchronised with the app, you will have to wait to the next release to see your latest contributions.
 
==My language does not appear in the app==
 
Only some languages are available in the app, the selection is done using the following criteria:
 
* Over 75% of the strings used in the app are available in the language and more than 50 strings are from the <code>local_moodlemobileapp</code> component.
* Over 50% of the strings used in the app are available in the language and more than 75 strings are from the <code>local_moodlemobileapp</code> component.
 
 
This is done to ensure translations are rich enough.
 
==How can I translate my plugin?==
 
If you are developing a plugin, you'll have to indicate which strings you want to use in the <code>lang</code> configuration option. You can learn more about this in the [[Moodle App Plugins Development Guide]].
 
[[Category:Mobile]]

Revision as of 09:38, 9 September 2022

This page is now located in the user docs: Translating the Moodle App