Page 1 of 1

Hardcode language?

Posted: Sun Mar 10, 2013 10:16 pm
by Dcru
Hi, I can't get Multisites working as OC is only a small part of my two sites (uk and fr version) - instead I'd like to 'hardcode' the language of the .fr domain to switch to French automatically. The two sites have their own copies of the files but share a database. Is this possible?

Many thanks!

Re: Hardcode language?

Posted: Mon Mar 11, 2013 6:03 pm
by Dcru
I got this working by editing index.php and adding the following condition to the Language Detection query;
$query = $db->query("SELECT * FROM " . DB_PREFIX . "language where code='fr'");

I'm guessing there's a more elegant method but I'm in a rush and I can't see any potential issues with this.