joomla: customize text in user menu

三世轮回 提交于 2019-12-12 06:41:16

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!