I have also modified the language selector in the header to switch between the folders.
Now, the biggest thing is that I want to hardcode each folder onto a language, for this I guess I need to adapt
system\library\language.php
I also think it'll be somewhere here?
Code: Select all
public function load($filename) {
$_ = array();
// Get the current default filename (eg: english.php or cart.php)
$dfn = ($filename == $this->languages[$this->code]['directory'])?D_LANG.'.php':$filename.'.php';
// Include the default language first
$dfile = DIR_LANGUAGE.D_LANG.DIRECTORY_SEPARATOR.$dfn;
if (file_exists($dfile)) { include($dfile); }
// Then include the specified language to override if exists
//$file = $directory.$this->languages[$this->code]['directory'].DIRECTORY_SEPARATOR.$filename;
$file = DIR_LANGUAGE . $this->languages[$this->code]['directory'] . '/' . $filename . '.php';
// Check it's not the same as the default, and it exists, then include
if (($dfile != $file) && file_exists($file)) { include($file); }
// We have no languages, exit
//if (empty($_)) { exit(sprintf(E_LANG,$filename)); }
if (empty($_)) { echo sprintf(E_LANG,$filename); }
$this->data = array_merge($this->data, $_);
}
I know this is a VERY crude work-around... but we are missing so many visitors and orders due to this issue that I need to have some sort of solution asap... and this is all I can think of....
again, the best solution would be for the country_code to be in the URL by default as a virtual folder or ?lang=xx this last part is available as a mod but that only ALLOWS the use of it, it doesn't always use it, this again, makes it impossible for google bots to read all languages.