Is it possible to change just the "post comments" part from the 'login or register to post comments' with the String Overrides module? I've tried this and it's not working. Does this have to do with having to "pass through t()" in order for String Overrides to work?

Comments

WorldFallz’s picture

From the string overrides project page:

Easily replace anything that's passed through t()

===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

greygoo’s picture

Right. I'm afraid I don't know what "passing through t()" means. How would I find out?

WorldFallz’s picture

sorry, i should have explained better. t() is a drupal function that is used to enclose strings for translation.

The only way to find out i know, is to find the string you want to change in the .module file that produces it and see if it's "my string here" or t("my string here"). If it's enclosed in the t() function, then stringoverrides can change it. If it's not, you should file a bug report against that module in the drupal issues queue.

===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

yngens’s picture

You don't have to install any module to override this kind of strings adding overhead consumption of resources to your website/server. Just open up settings.php and
in conf['locale_custom_strings_en'][''] = array( part add the following:


'<a href="@login">Log in</a> or <a href="@register">register</a> to post comments' => '<a href="@login">Log in</a> or <a href="@register">register</a> your custom text here' ,