[CRE Loaded] Default language
[CRE Loaded] Default language
I've recently installed Magic SEO on CRE Loaded plateform. It works fine but the problem is that
it detected the browser defaut language and displayed it automatically but now, it automatically
put the site in defaut language (english for me) but i use french browser. It should display the french language automatically.
Any idea ?
Thanks a lot
(Altobirus - Paris)
Re: [CRE Loaded] Default language
Code: Select all
// include the language translations
require(DIR_WS_LANGUAGES . $language . '.php');
or find in same file:
Code: Select all
$lng->get_browser_language();
and replace it with:
Code: Select all
$lng->get_browser_language();
$HTTP_GET_VARS['language'] = $lng->language['directory'];
Let me know whether it helped you or not.
Re: [CRE Loaded] Default language
If this can help you, in the same line where I added this code
Code: Select all
// Magic SEO
include(DIR_WS_INCLUDES . 'magic_seo_url.php');
I saw these lines
Code: Select all
// Ultimate SEO URLs v2.2
include_once(DIR_WS_CLASSES . 'seo.class.php');
if ( !is_object($seo_urls) ){
$seo_urls = new SEO_URL($languages_id);
}
May be if i use the same structure of code it will work but i don't know the name of the object. Any idea ?
Thanks for your help
Re: [CRE Loaded] Default language
Re: [CRE Loaded] Default language
I simply added after this code in include/application_top.php
Code: Select all
// include the language translations
require(DIR_WS_LANGUAGES . $language . '.php');
This line
Code: Select all
// Magic SEO
include(DIR_WS_INCLUDES . 'magic_seo_url.php');
And I deleted my cookie.......all is ok now !!!
Thanks a lot