eZ Community » Forums » Setup & design » switch language + subdomain/language
expandshrink

switch language + subdomain/language

switch language + subdomain/language

Monday 30 July 2012 5:47:57 pm - 8 replies

Hello !

I got 1 website with 2 languages (FR & EN).
For each language i've created a siteaccess (fr and en).

I'm using MatchOrder=host to access each of us.

Ok for that, it works when i call them separately (ex : fr.myDomain.com or uk.myDomain.com).

My problem is when i'm trying tu use the switchlanguage module. The rewrited links seems to be ok (something like http://fr.myDomain.com/switchlanguage/to/en).
But i click on these links they don't call the right page and the right subdomain. We stay on the same subdomain, same siteaccess.

My override/site.ini looke like this :

 [SiteAccessSettings]
ForceVirtualHost=true
CheckValidity=falseAvailable
SiteAccessList[]=frAvailable
SiteAccessList[]=enAvailable
AvailableSiteAccessList[]=xmliphone
AvailableSiteAccessList[]=MY_admin
MatchOrder=hostHost
MatchType=map
HostMatchMapItems[]=www.myDomain.com;fr
HostMatchMapItems[]=uk.myDomain.com;en
HostMatchMapItems[]=admin.myDomain.com;my_admin
HostMatchMapItems[]=xmliphone.myDomain.com;xmliphone
HostMatchMapItems[]=fre.1;fre

Monday 30 July 2012 11:11:10 pm

Hi Jérémy !

And what about your settings/fr/site.ini.append.php and settings/en/site.ini.append.php ?

Your files must have a [RegionalSettings] parameter. So, for your "en" siteaccess :

 [RegionalSettings]
Locale=eng-GB
ContentObjectLocale=eng-GB
ShowUntranslatedObjects=disabled
SiteLanguageList[]
SiteLanguageList[]=eng-GB
SiteLanguageList[]=fre-FR
TextTranslation=disabled
TranslationSA[]
TranslationSA[fr]=fre
TranslationSA[en]=eng

 

Hope it helps

Modified on Wednesday 01 August 2012 11:34:08 am by Sylvain Guittard

Tuesday 31 July 2012 11:08:15 am

Thanks Sylvain for your help.

But i have these files and the RegionalSettings parameters (only added TranslationSA info), and no changes ... sad.gif Emoticon

Tuesday 31 July 2012 11:26:49 am

Update !

Now when i use the links "switchtolanguage", i see that the url is well converted, but theres is no swith for the domain.

Exemple :

- i'm on the page FR : http:://www.myDomain.fr/monDossier/maPage

- i click on the uk Link 

- i obtain this url : http:://www.myDomain.fr/myFolder/myPage

but i need to have http:://www.uk.myDomain.fr/myFolder/myPage

any ideas ?

Thanks !

Tuesday 31 July 2012 3:18:29 pm

Your override/site.ini.append.php file contains :

 HostMatchMapItems[]=uk.myDomain.com;en

but you need to have http:://www.uk.myDomain.fr

 

Try this :

 HostMatchMapItems[]=www.uk.myDomain.com;en

 

Cheers.

Tuesday 31 July 2012 3:56:16 pm

.

Modified on Tuesday 31 July 2012 3:58:09 pm by Sylvain Guittard

Wednesday 01 August 2012 9:44:54 am

Quote from Sylvain Guittard :

Your override/site.ini.append.php file contains :

 HostMatchMapItems[]=uk.myDomain.com;en

but you need to have http:://www.uk.myDomain.fr

 

Try this :

 HostMatchMapItems[]=www.uk.myDomain.com;en

 

Cheers.

oh sorry i've already this in my override/site.ini (copy/paste mistake).

HostMatchMapItems[]=www.uk.myDomain.com;en

Wednesday 01 August 2012 2:30:11 pm

ok ! I got it ! 

in my Override/site.ini, i still have :

 [SiteSettings]
URL=www.myDomain.com

I removed that, and it it takes the url parameter from each siteaccess.

Thanks for your help, Sylvain !

Saturday 11 August 2012 11:25:45 am

Hi Jeremy - if you've solved your problem, please mark this issue as resolved by clicking the speech bubble next to the issue title.

Thanks!

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from