make strings disappear

make strings disappear

by Sarah Knight -
Number of replies: 5

Hello!

Does everyone know if it possible to make disappear a string?? I tried to replace the string with a blank space but it looks like it is not working....

(I am trying to make disappear some of the strings in the login intial page)

I would appreciate your help!

Average of ratings: -
In reply to Sarah Knight

Re: make strings disappear

by Gordon McLeod -

Hi Sarah,

If you've modified the language file to remove part of the message it's probably just a caching issue. I had the same issue when renaming 'news forum' to 'announcements' - any existing courses kept the old name, but all new ones created afterwards changed to the new term.

There's a "Purge All Caches" page at /admin/purgecaches.php - hopefully that would sort the problem.

Average of ratings: Useful (1)
In reply to Gordon McLeod

Re: make strings disappear

by Sarah Knight -

hmm.. I'm not sure it is the same issue... When I change the message , it works fine. But if I try to type only blank spaces (so the message disappears), and then I press "save and check in strings into files", it says:

There are no modified strings to check in.

 

So I guess you are not allowed to write just blank spaces, but I'm pretty sure I read somewhere some time ago that you could!!

In reply to Sarah Knight

Re: make strings disappear

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

Right. The Language customization tool does not support empty strings at the moment, I am afraid. You could try and use the following hack: instead of the empty string, use the following as your local customization:

<span />

It is just an empty span HTML tag that should do nothing when printed at the screen but the tool could consider it as a valid customization. Just be aware that this is applicable only for strings that are displayed as standard HTML texts in the user interface. There are strings used as email subjects, for example, where thick trick can't be used.

Average of ratings: Useful (3)
In reply to David Mudrák

Re: make strings disappear

by Frankie Kam -
Picture of Plugin developers

Just be aware that this is applicable only for strings that are displayed as standard HTML texts in the user interface
>

Therefore for other kinds of strings, the customized string will appear as < span / > instead of a blank. Oh well.