access plugin name frankenstyle string

Re: access plugin name frankenstyle string

by Davo Smith -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I've seen solutions whereby people have written something like $l = 'mod_MYPLUGINNAME' then used get_string('langstringident', $l).

If I'm honest, though, I've found them harder to read than just writing get_string('langstringident', 'mod_MYPLUGINNAME'). Bear in mind, you often want to use core language strings as well.