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?

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

3 Answers 3

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 and acknowledge that you have read and understand our privacy policy and code of conduct.

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