personalizing of language-files

personalizing of language-files

بذریعہ Andreas Grabs -
جوابات کی تعداد: 2
Core developers کی تصویر Particularly helpful Moodlers کی تصویر Peer reviewers کی تصویر Plugin developers کی تصویر Translators کی تصویر
Hello,
first sorry for my bad english اشارہ
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.
درجہ بندی کا اوسط: -
Andreas Grabs کے جواب میں

Re: personalizing of language-files

بذریعہ koen roggemans -
Core developers کی تصویر Documentation writers کی تصویر Moodle HQ کی تصویر Particularly helpful Moodlers کی تصویر Plugin developers کی تصویر 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.