Language Customization not saving

Language Customization not saving

by Pedrito Jimenez -
Number of replies: 5

Hi, 

So documentation reads: 

https://docs.moodle.org/310/en/Language_customisation


I can save changes with no error: 



But changes will still be highlighted in Blue color:


So, changes are not saving. What am I missing?

Thanks

Average of ratings: -
In reply to Pedrito Jimenez

Re: Language Customization not saving

by Randy Thornton -
Picture of Documentation writers
Pedrito,

I noticed this too. The strings ARE being saved. I have many saved customized strings which work fine. But they do show with a blue background, not green, just like strings modified in the same session.

I would suspect this is cosmetic.

Randy
In reply to Randy Thornton

Re: Language Customization not saving

by Pedrito Jimenez -
Hi Randy,

Well it seems like changes are not being saved. As the screenshot shows I've customized the "welcometousertext" string. Yet the default message is being sent to newly enrolled students, not the custom one I added. Is there a way to force the "write to file" process?
In reply to Pedrito Jimenez

Re: Language Customization not saving

by Randy Thornton -
Picture of Documentation writers
Ah, yes, there is.

Have you cleared out the cache, specifically the one for language strings. You will find this in Site admin > Developement > Purge caches. Sometimes it takes a while for the server to update the strings after changes. I usually purge the caches here after my changes..

Also, browsers will cache locally too, sometimes very aggressively. Usually, just refreshing the browser page will update the strings, but sometimes the user has to do a hard cache refresh locally too. Firefox in particular is slow to update caches.


There is a way you can prove the saving is working, if you really want to. You can look in /moodledata/lang/es_co_local for the particular php files that the strings are being saved in. That is where they are saved for each pack, using the directory xx_local where xx is your language code. (More about how that works in this discussion: https://moodle.org/mod/forum/discuss.php?d=413666).
In reply to Randy Thornton

Re: Language Customization not saving

by Pedrito Jimenez -
Hi Randy. I've checked and attached a screenshot of how my modified moodle.php looks like. 

I've purged caches and tried from another different device. Changes on language strings where done 2 days ago. The string I'm changing is "welcometocoursetext", the one used as a template on the registration to course notification email. Is this also cached by the browser?

So changes are being save to file, but there are not being read at the moment of sending the email? When I test it the default message keeps showing, screenshot attached.

What can I do?
Attachment Email_notification.PNG
Attachment moodle_php_lang.PNG
In reply to Pedrito Jimenez

Re: Language Customization not saving

by Randy Thornton -
Picture of Documentation writers
Pedrito,

Ah, well the good news is it is saving properly. More good news is that I think the problem is you are having is related to the string you are editing. If you are trying to change the string for the Self-enrolment method course welcome message, that string is in the component named Enrol_self.php, not in the component moodle.php. See some more explanation and the fix for that here: https://moodle.org/mod/forum/discuss.php?d=353997

Randy