问题
In the user-menu module, I want to change the text in the div.login-greeting element (which is a child of the form#login-form element).
Right now, it says "Hi Steph," (supposing the username is Steph)
I want it to say "Hi, Steph".
That's all.
I can't figure out if what I need to do is a template override or something else... because I can't figure out where the heck these elements come from. I am fairly new to Joomla, and intermediate in php. I've found working with the module manager, adding class suffixes, placing module positions in index.php, etc. all quite straightforward. I did a template override for the login module, with no trouble. But the menu module is baffling me. Looking at the default.php, I can't even figure out how it puts the form in there when it's a user-menu and not just a normal menu. Where does this form come from?? How can I change it???
回答1:
Go to language>en-GB>en-GB.mod_login.ini
and change MOD_LOGIN_HINAME="Hi %s,"
to MOD_LOGIN_HINAME="Hi, %s"
and save the file.
EDIT
If you need to change more strings it's better to create a file en-GB.override.ini
inside language/overrides
and put only the strings that you want to override from any extension. For example it might contain only:
MOD_LOGIN_HINAME="Hi, %s"
MOD_LOGIN_REGISTER="Click here to register"
来源:https://stackoverflow.com/questions/20927963/joomla-customize-text-in-user-menu