I have a lot of local lang strings that I want to delete. But Moodle restores them automatically even if I purge all cache and deactivate 'Cache language menu' and 'Cache all language strings'. It seems that they can only be deleted one by one on the lang customisation page?
How to effectively delete local translations?
Number of replies: 9Re: How to effectively delete local translations?
You may find it easier to edit the local language pack files directly, if possible. Check your moodledata/lang/dk_local/
(or whatever needed *_local
there).
Ang: Re: How to effectively delete local translations?
Hi David,
Thank you for your answer, but unfortunately Moodle doesn't get distracted no matter if I delete an entire local lang file or a single record in a file, it just keeps on acting as if nothing happened. I seem to be trapped by features, even though I have full access to everything, there doesn't seem to be any way to avoid them. I even tried to uninstall the lang pack, purge cache again and reinstall, Moodle still serves my previously edited local translations. Deleting moodledata/cache makes no difference either.
Bente
Re: Ang: Re: How to effectively delete local translations?
I have found that after making changes to my theme Lang/en folder and saving it, I have to go to Site Administration > Languages> Language Packs and then click on "Update installed packs." In the bottom of the list on the left/middle of the page.
This updates your local flanguage file and shows the changes Instantly.
It may not be relevant for you...but it may help?
Cheers
Mary
Ang: Re: Ang: Re: How to effectively delete local translations?
Hi Mary,
Thanks for your suggestion, but unfortunately I tried without much luck. Moodle stays totally indifferent
My only luck was that my expectations were at a very low level and likewise my disappointment
Bente
Re: Ang: Re: Ang: Re: How to effectively delete local translations?
Moodle stays totally indifferent
That's weird and I tend to think something else is going on.
Re: Ang: Re: How to effectively delete local translations?
After any manual modification of string files (including theme files or local packs), you have to purge string caches. This can be done via inbuilt "Purge caches" tools.
On development machines, it is better to have $CFG->langstringcache = false;
in your config.php file, or have that option disabled via admin UI. Then the strings caching is disabled and there is no need to purge.
Ang: Re: Ang: Re: How to effectively delete local translations?
Thanks, David, you made my day!!!
Moodle cached my lang strings though I had deactivated 'Cache all language strings', so I tried to edit config.php like you said -> no luck.
Then I looked for cache tools, found the 'Language string cache', and that did the job! So 'Purge all cache' does not purge all cache, though that is what you should expect from the description on the page admin/purgecaches.php:
(purgecachesconfirm/admin)
I can make a bug record about it.
Re: Ang: Re: Ang: Re: How to effectively delete local translations?
Then I looked for cache tools, found the 'Language string cache', and that did the job!
What exactly do you refer to and what did you do to make it "do the job" ? I am assuming you refer to "Language string cache" definition at Site administration ► Plugins ► Caching ► Configuration. What settings do you have there?
If you press the button "Purge all caches" at Site administration ► Development ► Purge all caches, Moodle internally calls the function purge_all_caches()
which in turn resets the caches used by the string manager, among other things. In other words, I can't really imagine why/how purging all caches does not work and purging the language string cache manually does work ...
Ang: Re: Ang: Re: How to effectively delete local translations?
Well, it seemed like you made my day, David. But now all the strings are back in the cache.
I deleted all local files with customizations. I downloaded a backup though, while I wanted to keep a few strings in a few files, so I uploaded these files only with those entries, after having purged Language string cache. Then all my just deleted strings did pop up again like a jack-in-the-box
BTW I did create a bug report: MDL-55153
Edit:
I am assuming you refer to "Language string cache" definition at Site administration ► Plugins ► Caching ► Configuration.
Yes, exactly. I have not configured it, so it has default settings.