personalizing of language-files

personalizing of language-files

napisao/la Andreas Grabs -
Broj odgovora: 2
Slika Core developers Slika Particularly helpful Moodlers Slika Peer reviewers Slika Plugin developers Slika Translators
Hello,
first sorry for my bad english namiguša
Some users would be able to personalize the language-package. It is very uneasy after an upgrade to merge the own changes with all of the language-files.
I have a suggestion:
Put into any language-files at the end the follow lines

//--------------------------------------------

if(file_exists(__FILE__  . '.user')){
include(__FILE__ . '.user');
}

//--------------------------------------------

and any user will be able to use own personalized language-files with the extension ".user". If there is a new upgrade the user only have to put the *.user-files in the lang-folder and thats all.
Odgovor na Andreas Grabs

Re: personalizing of language-files

napisao/la koen roggemans -
Slika Core developers Slika Documentation writers Slika Moodle HQ Slika Particularly helpful Moodlers Slika Plugin developers Slika Translators
It is not necessary. There is already a way to customize the language files.

from the translationguide

If you just want to change a few things in the interface to suit your own site better, don't start editing one of the standard language packs. If you do then your changes will be overwritten next time you upgrade to a new Moodle.

Instead, use the instructions above for making a brand new language pack, and set the parent language (in moodle.php) to be the language that is most similar to yours. For example, a good name for a local english version would be "en_local", and the parent language would be "en" or "en_us".

Note that for everyone on your site to see this new pack you have to select it as the site language and restrict the available languages on Admin >> Configuration >> Variables.