personalizing of language-files

personalizing of language-files

از Andreas Grabs در
Number of replies: 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.
میانگین امتیازات: -
In reply to 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.