22980 Posts in 11809 Topics by 2827 members
|Go to End|
29 June 2011 at 9:44pm Last edited: 29 June 2011 9:44pm
Hello Cris, hello to everyone.
First of all, thanks for this fine module. You'll make my costumer happy. But, it didn't work in a proper way. Maybe i've missed something.
The CMS (SS2.4.5) is located at my costumers ISP (German:Strato) in a folder named ‘CMS‘. There are two TL-Domains (.com + .de) which are pointing to this specific folder. This bilingual website is working fine so far. ( urls, translations, i18n, langEditor a.s.o). So I wanted give your module a try. My code in _config.php looks like this.
// Set the site locale
Object::add_extension('SiteConfig', 'Translatable'); // 2.4 or newer only
//config for the TRANSLATABLE-DOMAINS Module -> switch the TLD depending on the locale
The initial entering of this website works as expected. www.faerber-acoustics.de goes to the german locale and www.faerber-acoustics.com goes to the english language ( www.faerber-acoustics.com/homepage). But if i want to switch the language on lets say www.faerber-acoustics.de/technik to english (via the languageswitcher) the TLD is not changed. The switch url is www.faerber-acoustics.de/technology but it is redirected to /technik because it‘s the german TLD-Domain. I think the link should be www.faerber-acoustics.com/technology, right?
the code of the switch:
<div id="LangSwitcher" class="threecol last"><% _t('stromimzoostyle.HEADERLANGSHOWPAGEIN','Show page in: ') %>
<% control Translations %>
<a href="$Link" hreflang="$Locale.RFC1766" title="Change the language in...">$Locale.Nice</a> |
<% end_control %>
Do i have to change the code of the language switcher? Any hints?
1 July 2011 at 12:24am
Just to make it more clear. The language will not switched because the domain is not changed. So the cms tries to change the languange (...de/technik to ...de/technology) but the translatable domains module redirect the user back to the german language.
Thanks for your help. Pipifix
14 July 2011 at 3:15pm
thanks for the feedback on the module, i just barely came across this.. i subscribed to other posts and dont really look through the forum every day, so i missed it, sorry.
you're correct about what is going on there.. the module enforces the locale set for the domain, so if you direct to the translation, it gets redirected back. this is also an issue when you are in the cms and click 'view published page' in a non-default locale... it detects the tld and may switch to the appropriate translation based on what the tld is.
the fix for this is coming.. the answer will be to call absoluteURL on the record instead of link, but I need to modify how absoluteurl's are written. (literally the next thing on the list)..
thanks for kicking the tires and let me know if you have any questions,
14 July 2011 at 3:20pm
one more thing, if you leave 'www.' out of the domains you are registering it may work better in the situation where someone types in http://faerber-acoustics.com.. (2 birds, 1 stone).
|Go to Top|