MyBB Community Forums

Full Version: Language Caching
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello MyBB community

I'm a developer and was wondering how MyBB caches language strings.

If someone could point me in the right direction, I would very much appreciate it.

If this topic is in the wrong forum, I'm really sorry and please Mod move it to the right subsection.

Greetings everyone!
It loads them from the language files, in ./inc/languages/english/file.lang.php. Say you were using global.lang.php, you'd call $lang->load("global"); which would load the values, and then use $lang->string_title (string_title being the key in the array in the language file) which would then output the actual text.
Are these files generated dynamically?
I ask because one can edit language strings from the admin CP, right?
They're not generated dynamically, but you can edit them in the ACP and it'll just rewrite the file. It's just a more convenient way of editing them, rather than editing the file itself.