0
votes

I have setup a multi lingual site using magento version 1.3.2.4 and have come accross some weird problems. Hoping that I could get some assistance.

The requirement was to add the new store view (dutch) and also maintain the current stores url structure, so I couldnt use 'Add store codes to urls' in the admin configuration as it would append the current urls with the default store code (fr). So, ultimately I needed the following url structures:

Default language (fr) url style : http://www.domainname.com Dutch version url style : http://www.domainname.com/nl

For this I performed the the following steps:

  1. I created a store view (code nl)
  2. I created a folder by the name of nl

    • I copied the .htaccess and index.php from the main web root and pasted it in this folder
    • I modified the code as follows in index.php :

    Mage::app()->getLocale()->setLocale('nl_NL');

    $mageRunCode = 'Netherlands';

    $mageRunType = 'store';

    Mage::app()->setCurrentStore(1); // 1 being the nl store id

    Mage::run($mageRunCode, $mageRunType);

When I launch the site, and goto http://www.domainname.com/nl the interface is in dutch as expected, but when I perform the following tasks I get redirected

back to the default language:

  1. Login
  2. Goto checkout/cart
  3. Goto new user signup

Upon checking the view-source of the DOM I notice that some urls are pointing to the default language and not the nl language. For example the login form's action attribute is http://www.domain.com/customer/account/loginPost/ and not http://www.domain.com/nl/customer/account/loginPost/

Warm regards,

2

2 Answers

2
votes

Hi instead of creating such a stuff .You can use this extension . Hope this help you and you can easily switch your language without creating a store view.

0
votes

I got the same problem, cant have the same store code twice and when i try a new code it want link to the translation pack!