3/17/2009

How to Rename The Top Links in Magento

Many times you found some demand or requirement from the client to change the top links of magento.

Yes, I am talking about top links.



You can rename this by two way

1) Searching this string in Magento's Core File (Never follow this)

Or

2) Magento has provide very good features of language management. you can rename any text by adding it's replacement text in translate.csv file

You will get this file in /app/design/frontend/default/[theme_name]/locale/en_US/ folder. You have to enter all substitute of text in every new line. In csv file, first mention the text that you want to change and after putting comma(,) mention it's replacement text.

for example,

To change "My Cart" to "My Bag", you have to insert line as

"My Cart","My Bag"

I am here mentioning some advance language replacement for you.

1) When you add any product in cart, top link will display like "My Cart (1 item)". now if you want to change this string to like "My Cart (1 item)" then you can do it by writing below code in csv file

"My Cart (%s item)","My Cart <b class='redfont'>(%s item)</b>"

2) When you add any product in wishlist, top link will display like "My Wishlist (1 item)". now if you want to change this string to like "My Wishlist (1 item)" then you can do it by writing below code in csv file

"My Wishlist (%d item)","My Wishlist <b class='redfont'>(%d item)</b>"

Hope, this will help to someone like me

thanks

No comments:

Post a Comment