I see something like the below in magento
<?php echo $this->__('* Required Fields') ?>
Why can't I simply use
<?php echo "Required Fields" ?>
The output seems to be the same in both cases. What is the function of the $this->__ . I see this usage in a lot of places and would like to clear any misunderstanding I may be having.
Any help greatly appreciated.
$this->__('echo text here')- your site is English now but maybe down the line it will require additional languages. The code you posted gets the username of a logged in user. – SR_Magento Jul 14 '15 at 18:31escapeHtml(): You want to be sure that it also works if the translation has funny characters. See: http://magento.stackexchange.com/questions/569/how-to-escape-output-data – Fabian Schmengler Jul 21 '15 at 12:59