Translate text write on layout xml file.

There is sometime we need this translation to translate it globally. I have spend lot of time to find this solution so I thought may someone can save sometime to get rid from this.

Hope someone can take help from this.

and enjoy his time to developed new thing ­čÖé

Here is how translation work for layout file.

<reference name="breadcrumbs">
<action method="addCrumb" translate="crumbInfo.label crumbInfo.title">
<crumbName>Beregn pris</crumbName>
<label>Beregn pris</label>
<title>Beregn pris</title>
<action method="addCrumb" translate="crumbInfo.label crumbInfo.title">

in the above example you have notice that crumbInfo.label crumbInfo.title this is because it label and title is child of crumbInfo so you have to define it using dot(.)

for parent element tab you just need to write┬átranslate=”label title” only here you can write multiple attribute with (Space) separated. It will translate each element.

Now you just need to add translate.csv in you locale folder with you locale code folder.




Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s