I'm building a custom page.
I add breadcrumbs like this (and it works well).
<brand_brand_index translate="label">
<reference name="breadcrumbs">
<action method="addCrumb">
<crumbName>Home</crumbName>
<crumbInfo>
<label>Home</label>
<title>Home</title>
<link>/</link>
</crumbInfo>
</action>
<action method="addCrumb">
<crumbName>All Brands</crumbName>
<crumbInfo>
<label>All Brands</label>
<title>All Brands</title>
</crumbInfo>
</action>
</reference>
[[...]]
</brand_brand_index>
The problem is label not translated in front-end. It shows Home / All Brands
instead of translated version.
The things I made sure:
- Added
translate="label"
to handler - Cache cleared (acctually I turned off caching)
- Translation syntax is correct (I put in Mage_Core.csv)
- Label is translated properly by php code (eg:
$helper->__('All Brands');
Help me to figure it out, please.
Thank you.
Best Answer
To translate a crumb without using a helper, you can use the
translate
attribute for youraction
node by usingcrumbInfo.label
andcrumbInfo.title
.Exemple:
It's the better way to translate breadcrumbs, use helpers only if you have the set a custom title depend on URL params or something else.