ruilong Posted December 23, 2008 Share Posted December 23, 2008 If I set up 2 different domains, say one .se and one .comInstall prestashop on both of these pointing to the same database.would it be possible to easy change the default language on the two stores? say, .com has english and .se has swedish for default? i.e override the default language parameter on one of the stores.any ideas? Link to comment Share on other sites More sharing options...
Matthieu Biart Posted December 24, 2008 Share Posted December 24, 2008 Hi ruilong!It's possible but you'll have to edit the PrestaShop core.And I warn you, it will be irksome 'cause you'll have to replace all Configuration::get('PS_LANGUAGE_DEFAULT') calls.Good luck adventurer. Link to comment Share on other sites More sharing options...
ruilong Posted December 25, 2008 Author Share Posted December 25, 2008 what if I just edit configuration class? would it be possible to do some kind of override on the get command?like if(input = PS_LANGUAGE_DEFALUT) return language I want?I did a try on this idea and ended up changing configuration.php in class if($key=='PS_LANG_DEFAULT') return 1;where 1 is the id of the language I want, seems to be working, but I will do some more testing of this and se if it works well.. if it does, maybe prestashop 1.2 should get a new feature? like the possibility to set different languages for different domains as default as this would be great from a SEO point of view (better than having many different languages on one domain) Link to comment Share on other sites More sharing options...
cactusman2 Posted December 25, 2008 Share Posted December 25, 2008 Where did you add this line in the configuration.php file?I'm very interested to give a try as I'm not happy with the management of multilanguage in PS. Link to comment Share on other sites More sharing options...
ruilong Posted December 25, 2008 Author Share Posted December 25, 2008 first line in "static public function get" (starts at line 89) Link to comment Share on other sites More sharing options...
bobslay Posted February 22, 2009 Share Posted February 22, 2009 Hi,any update on this? I'm really interested in using this method as i already have 2 urls, one for english and one for french content. I would give it a try but i would like to have more info on how to do it. Maybe you could post part of your script so i could understand it.Many thanks Link to comment Share on other sites More sharing options...
ruilong Posted February 23, 2009 Author Share Posted February 23, 2009 Not much to post really.. you need two ftps, change the file classes/configuration.phpfirst line in “static public function get” (starts at line 89)and just add thisif($key==‘PS_LANG_DEFAULT’) return 1; (Where 1 is the id of the language you want for the url pointing to this ftp) Link to comment Share on other sites More sharing options...
merinoexperten Posted September 9, 2010 Share Posted September 9, 2010 I cant get it to work, I still have the problem with default language. When browse my website with one computer everything is default in Swedish and when i use the other it´s in English.I tried to add the change in classes/configuration with no luck.BrPeter Link to comment Share on other sites More sharing options...
delite Posted October 14, 2010 Share Posted October 14, 2010 I have same problem as merinoexperten, the default language displayed on back office is Romanian but when i enter in the store its in English. The only solution i found is to disable English and keep Romanian as the only active language but im used to have backoffice in English so i really hope there is a fix.P.S. i cleared all the browser cookies, temps, etcThank you! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now