joomla:在用户菜单中自定义文本 [英] joomla: customize text in user menu
问题描述
在用户菜单模块中,我想更改div.login-greeting元素(是form#login-form元素的子元素)中的文本.
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).
现在,它说Steph"(假设用户名是Steph)
Right now, it says "Hi Steph," (supposing the username is Steph)
我希望它说Steph".
I want it to say "Hi, Steph".
仅此而已.
我不知道我需要做的是模板替代还是其他...因为我不知道这些元素到底来自哪里.我对Joomla相当陌生,并且在php中处于中级水平.我发现与模块管理器一起工作,添加类后缀,将模块位置放置在index.php中等等都是非常简单的.我为登录模块做了一个模板覆盖,没有任何麻烦.但是菜单模块让我感到困惑.查看default.php,当它是用户菜单而不是普通菜单时,我什至无法弄清楚它是如何将表单放入其中的.这个表格是从哪里来的?我该如何更改???
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???
推荐答案
转到language>en-GB>en-GB.mod_login.ini
并将MOD_LOGIN_HINAME="Hi %s,"
更改为MOD_LOGIN_HINAME="Hi, %s"
并保存文件.
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.
编辑
如果需要更改更多的字符串,最好在language/overrides
内创建文件en-GB.override.ini
,然后仅将要覆盖的字符串放在任何扩展名中.例如,它可能仅包含:
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"
这篇关于joomla:在用户菜单中自定义文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!