4

Now I try to setup multiple language in magento single store view. So, Is it possible in Single Store view?

Because I have created Multiple Store views For Every Vendor. So, Now can I have multiple languages for magento single store view?

  • 7
    No. Restructure your store so vendors use store groups or websites. – Foo Bar May 6 '14 at 11:27
  • 1
    I don't think it is possible as it would also interfere with the caching (if enabled). – RobM84 Oct 22 '14 at 16:27
2

You can set Direct Language code

$locale = 'nl_NL';
Mage::getSingleton('core/session')->setMyLang($langCode);
$locale = Mage::getSingleton('core/session')->getMyLang();


Mage::getSingleton('core/translate')->setLocale($locale)->init('frontend', true);

$defaultStore = Mage::app()->getStore()->getCode();
Mage::app()->setCurrentStore($defaultStore);
Mage::app()->getLocale()->setLocale($locale);
Mage::app()->getTranslator()->init('frontend', true);

$defaultLocale = Mage::app()->getLocale()->getLocaleCode();

now Site translate in Your set Language.

2

It is possible to change the language programmatically and the translation cache takes both into account, locale and store view, so you could code some custom language switcher with code from https://magento.stackexchange.com/a/19741/243

BUT

This is not how you are supposed to use the Magento store system, and it's most likely not worth the effort.

Try to restructure the setup so that one vendor can have multiple store views. I don't know the details of your system but probably one website per vendor is a better solution.

0

You can set a store for each vendor also to particular website,

and can set language for each store separately

the sore view is nothing more then a language module in magento, many languages within the store view should be avoided , doing so will lead to confusion in the basic system design

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.