Difference between die(_("Access Denied.")) and die("Access Denied.")?

Permalink 1 user found helpful
The code snippet at the top of most files:

<?php defined('C5_EXECUTE') or die(_("Access Denied.")) ?>

Sometimes I have seen it like that, and sometimes I have seen it like this:

<?php defined('C5_EXECUTE') or die("Access Denied.") ?>

What's the difference between these, and which one is the right one to use?

View Replies: View Best Answer
JohntheFish replied on at Permalink Best Answer Reply
I asked that question a couple of year ago. Apparently it doesn't matter.

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.
dsw528 replied on at Permalink Reply
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.
bbeng89 replied on at Permalink Reply
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.