Difference between die(_("Access Denied.")) and die("Access Denied.")?
Permalink 1 user found helpful
The code snippet at the top of most files:
Sometimes I have seen it like that, and sometimes I have seen it like this:
What's the difference between these, and which one is the right one to use?
Sometimes I have seen it like that, and sometimes I have seen it like this:
What's the difference between these, and which one is the right one to use?
Ah, alrighty. Good to know.
Thanks for the response! Guess I'll just stick with the _( version, just in case they find a way to get it to work in the future.
Thanks for the response! Guess I'll just stick with the _( version, just in case they find a way to get it to work in the future.
I was curious about this too so I was glancing at the code a bit and it looks like the _() function is the Zend translation function which is used by the t() function. So I'm wondering if the idea is that you use _("Access Denied") to translate in case the startup/localization.php script hasn't been loaded yet. I'm not sure though. I'd be curious to hear the real reason as well.
Trying to remember what @mnkras said then (please correct if I am wrong).
The _() form would translate, except the translation engine is not initialised at that point, so it makes no difference.