Building language files in custom app.

Re: Building language files in custom app.

by Pau Ferrer Ocaña -
Number of replies: 0
Picture of Core developers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers
Hi Mark!

We just remove the strings from the modules directories because we had too many duplications. You will find all the languages on src/assets/lang. There you can add edit and include new strings on any language. Also you can run the scripts create_langindex.sh and update_lang.sh from the scripts directory.

The first one will help you provide where the new strings are placed in the translations directory (Amos) and will auto-edit langindex.json. You'll find more info here: https://docs.moodle.org/dev/Translating_the_Moodle_app

The second will update and add new languages to the app based on the number of translations (check the translating the Moodle app wiki page). It admits a lang code parameter to force building in a language and it will import new strings onto it.

Consider that those scripts clone the translations git repository onto $LANGFOLDER, edit functions.sh to change it.

Cheers!