MyBB Community Forums
Editing global.lang.php - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Themes (https://community.mybb.com/forum-103.html)
+---- Forum: Theme Support (https://community.mybb.com/forum-10.html)
+---- Thread: Editing global.lang.php (/thread-161786.html)



Editing global.lang.php - iAndrew - 2014-10-24

Is it possible to change certain language phrases like moderator alerts, PM alerts and add them into a theme or would one have to change them separately on his/her forum?

This is what I've done with the PM alert / Mod Alert.

[Image: ibrPoct9sEBqJV.png]


RE: Editing global.lang.php - Darth Apple - 2014-10-24

The language files are loaded via PHP, so I don't believe it's possible to add additional language variables without requiring a plugin of some sort. I generally just hardcode mine, but I can get away with that since I only really design stuff for my own forum. #designerhabits Toungue


RE: Editing global.lang.php - iAndrew - 2014-10-24

Thanks for the reply, i'm not adding additional language variables just editing them how they say

"you have one new message by so and so" and changing it to just the number, with a tool tip on hover so you know which alert is which.

Anyway to hardcore these into a theme without people needing to edit language files?


RE: Editing global.lang.php - Destroy666 - 2014-10-24

You can simply use specific the number variables instead of language variables. For example {$mybb->user['pms_unread']} for unread PM number.


RE: Editing global.lang.php - iAndrew - 2014-10-24

Thanks, is there a number variable for the moderator alert count?


RE: Editing global.lang.php - Destroy666 - 2014-10-25

$unread