Localized Language Customation/Language Edit Interface

Localized Language Customation/Language Edit Interface

by Sojiro Sato -
Number of replies: 3
We've customized the Moodle source code to extend some features and edited some tags as well. When post a Course Guest Access Node and the proper pages but when we we add something like "$string['courseguestaccessnote'] = '...'" in moodle.php, it doesn't show up in the web interface for editing.

Can someone point me on the right path? Thanks
Average of ratings: -
In reply to Sojiro Sato

Re: Localized Language Customation/Language Edit Interface

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Hi Sojiro,

What Moodle version are you using? Into which moodle.php are you adding the string? At the moment, the policy and the only supported way is to add new strings into $CFG->dirroot/lang/en_utf8/*.php (e.g. moodle.php).


In reply to David Mudrák

Re: Localized Language Customation/Language Edit Interface

by Sojiro Sato -
1.8.5 and into en_us_utf8_local

If I added it to en_utf8 (default/main language), wouldn't it just overwrite my strings with each update? If that's the case, could this changed so that new strings are editable from localized versions of a language in the interface?
In reply to Sojiro Sato

Re: Localized Language Customation/Language Edit Interface

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Yes, you are right. New strings in standard lang files will be overwritten during the next upgrade. To avoid this, put your new strings into separate file, e.g. localstrings.php and use them by calling get_string('stringid', 'localstrings');
I will notify Avi - our GSoC student working on new translator UI - to think about it. Thank you for the proposal.