Building language files in custom app.

Building language files in custom app.

autor Mark Webster -
Počet odpovědí: 1

Hi, I see in https://tracker.moodle.org/browse/MOBILE-2639 building of all languages except English was removed. Say I'm building a custom app with some custom strings, how do I go about building the languages other than English now they've all been deleted?

Průměr hodnocení: -
V odpovědi na Mark Webster

Re: Building language files in custom app.

autor Pau Ferrer Ocaña -
Obrázek: Core developers Obrázek: Moodle HQ Obrázek: Peer reviewers Obrázek: 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!