Does anyone know what this Magento function does : function __('text') ?

I guess it echoes text, but it is not a php native function. Using Sublime text, is there a way to find in which class it defined ? I use Magento CE 1.8.


__ is the translation function.
It translates the text received as a parameter if if finds a translation or it returns the text as it is if there is no translation.

The function not defined in any class.
It is defined in the functions.php file
The functions.php file is included in Mage.php so it is available for all requests.

|improve this answer|||||
  • @Marius is the technical name for this function "translation" or do we call it something else? – Xenocide8998 Nov 16 '16 at 16:48
  • Not sure if it's the technical name. I have been calling it like that since the beginning. – Marius Nov 16 '16 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.