deniz
deniz

Reputation: 189

Magento - Multilanguage Page Links In Top Menu

i need to add my custom page's links to the top menu.. thats ok; we can do this by editing topmenu.phtml. But it must be multilanguage.. I mean, page's name should be change on every language selection/english shop, spanish shop etc.

Do you have any idea how to add multi-language page links in top menu?

ps: im using magento 1.9

Upvotes: 0

Views: 1409

Answers (2)

dmanners
dmanners

Reputation: 2072

So as long as you have the languages and stores set-up then all you should need to do is translate the link. This can be done by the following steps.

  1. Add translation to template using $this->__('Your String'),
  2. Add translations to the correct language packs. I would suggest here either inline translations or translations in the theme would work best for you as you do not need a complete module for a single link,

File should look like:

"Your String","Your string in different language"

The strings should go in the locale file in your theme. It should look as follows: app/design/frontend/your_package/your_theme/locale/en_US/translate.csv and you can replace en_US with whichever locale you need.

Upvotes: 0

Deepak Mankotia
Deepak Mankotia

Reputation: 4584

You need to create multi store for this.

In order for the frontend of your store to be displayed in different languages you have to add a store view for each language. Although store views can be used for other purposes they are primarily used for creating multilingual stores. Each store view corresponds and is assigned to a language. By default, a Magento installation without sample data comes preconfigured with a single store view called Default Store View, while if you installed Magento with sample data, it should have three store views: English, French and German. Note that having a store view and switching to it on the frontend (or backend) doesn't mean that the site will be translated in the particular language. For this to happen you also have to install the corresponding language pack (or translate the default text strings manually), and you have to edit and translate the relevant options of the existing categories and products in the particular store view. We'll come to this further down in this tutorial.

Follow steps to create multiple store :

You can add new store views or edit the existing ones from the admin panel of your Magento. To do this go to System menu>Manage Stores. On the page that opens you'll see a table with three columns; the first one for the website, the second one for the store and the third one for the store view. It represents the website(s) with each store and store view. To edit an existing store view click on its name in the table; to add a new one click on the Create Store View button that's above the top right corner of the table.

Installing a Language Pack/Translating Text Strings

Once you create the store view(s) you need to install the language pack for the respective language. The language pack contains files with translations of the default text strings that appear on the frontend.

Changing Locale Settings

After you create the store view and you upload the language files for the particular language you need to change the locale option of the store view in order for the translations to be seen on the frontend. To do this, in the admin panel go to System menu>Configuration and select the store view (e.g. French) from the Current Configuration Scope drop-down menu in the upper left corner. Then click on the General button in the General section on the left, expand the Locale Options panel on the right, unmark the Use Website checkbox that's next to the Locale drop-down menu and set the drop-down menu to the same language (e.g. French):

Upvotes: 1

Related Questions