Page title with seo in default language

I have a website in two language french and english. I have a problem because when google visit my website, I think he visit it in english and in google.fr it write my website in english version and not in french.

So actually I have :

mydomain.com who depend on the explorer

mydomain.com/fr the french version

mydomain.com/en the english version



so it is possible to have only

mydomain.com for the french version

mydomain.com/en for the english version



or do you have a solution to oblige google to visit my website in french.

thanks for your experience

I had the same problem.

Cs-cart uses user information to determine the language it uses. When it doesn’t recieve any user information, (Like when bots goto the shop) it uses THE FIRST LANGUAGE IN THE LANGUAGE ARRAY! :confused: :confused: :confused:



you have 2 languages so the first one is english and the second is french. I had the same problem so i’ve flipped the array so that the language I want is on top.



Note that when you have more languages it just DESC sorts the array.



In /core/fn.init.php Find:

foreach ($languages as $k => $v) {
if ($v['status'] == 'D') {
continue;
}

$avail_languages[$k] = $v;
}

Add after

krsort($avail_languages);

Done!

Hi,



Have the same problem and then I tried your solution. it worked changing the language order, but I have my shop translated into 4 languages, and the default one should be Spanish, but now, with the code change, instead of the English by default when indexing, I have Portuguese.



Meaning that I still don’t have Spanish as default one. Any code solution available for this?



Thank’s :wink:

fooled around a bit and now have something that will put the default language on top of the array. I havent tested it in a live shop so let me know if it works.

Uncomment the print_r to see if the array sorts the way it should :wink:



replace the krsort line in my first code with this:

```php

function sort_default_lang($avail_languages)

{

$dlang = Registry::get(‘settings.Appearance.’ . AREA_NAME . ‘_default_language’);

if($dlang != “”)

{

foreach($avail_languages as $key =>$value)

{

if ($key == $dlang)

{

$lang[$key] = $value;

}

else

{

$lang1[$key] = $value;

}

}

$lang = $lang + $lang1;

return $lang;

}

}

$avail_languages = sort_default_lang($avail_languages);

//print_r($avail_languages); //check to see the array sorts nicely

```

Well, it did sort the languages in the right way, but when opening main page, it gives an error message saying that jcarroussel is going in loops…

very strange. my test version of cscart doesn’t give any error’s. What is the excact error given by jcarrousel? Maybe it has something to do with cscart 2.0.6 you seem to be using. Having no problems on 2.0.8.

Maybe it is related with 2.06 version…:?

When I opened my site, jumped a pop up saying that there is a permanent error with jcarrousel going on in infinit loops. This pop up would not let me close it, just went crazy the dm# thing!! Had to erase the modification…

Hello,



I modified the code as you wrote. But nothing changed! :confused:

I have two languages instaled and want to make non-english as default.



Edited:

I had to do this in a diferent way in same part of the code.



Thanks!


[quote name=‘flimflap’]I had the same problem.


In /core/fn.init.php Find:

foreach ($languages as $k => $v) {
if ($v['status'] == 'D') {
continue;
}

$avail_languages[$k] = $v;
}

Add after

krsort($avail_languages);

Done!
[/QUOTE]