I see in a config.xml
file. I know that <template>
block and this is the block hold the email template, and translate
attribute which is present will be translate in the locale
folder. But I don't know what is it exactly, and how does it work?
<template>
<email>
<customer_active_account_email_template translate="label" module="customer">
<label>Active Customer</label>
<file>customer_active.html</file>
<type>html</type>
</customer_active_account_email_template>
</email>
</template>
When you see translate="label" module="customer"
, this tells Magento that it should pass the value in the <label> tag through the customer module's data helper's translate method before displaying it to the screen. In over simplified terms
$label_value = (string) $node->label;
echo Mage::helper('customer')->__($label_value);
If the module attribute is not present, the core
module is used. You may specify multiple tags to be translated with a space delimited string.
translate="label type"
As far as I know, this is supported in the System Configuration section, and the layout xml <action> nodes (for translating paramaters) only.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With