eZ Community » Forums » Install & configuration » URL translation and language switcher...
expandshrink

URL translation and language switcher redirecting to untranslated URLs

URL translation and language switcher redirecting to untranslated URLs

Wednesday 17 August 2011 3:04:18 pm - 2 replies

Hey,

I'm currently setting up a site on Community Project 2011.7 and need some help regarding translated URLs. The site is multilingual, has 4 siteaccesses (de, en, it, admin) and is using host based mapping for siteaccess detection (www.example.com, en.example.com, admin.example.com, ...). This is working fine so far, however I have a little problem with language switching and content being delivered on translated and untranslated URLs which leads to duplicate content. An example:

I am on www.example.com/karriere (de) and want to switch to the english site and click on the languageswitcher for the en siteaccess. The link is www.example.com/switchlanguage/to/en/karriere

When I access the english career page without the language switcher, the URL is en.example.com/career. However, the language switcher redirects me to en.example.com/karriere. This basically works (user gets to the right site), but is quite ugly in terms of consistency and SEO (same content reachable through multiple URLs).

Is there a setting/extension/other possibility to:

  • either set up the language switcher to redirect to the correct translated URL
  • or (even better) let nodes check if their URL is the translated one and otherwise send a 301 redirect to the translated one

Thanks,
Mathias

Monday 22 August 2011 2:31:56 pm

there exists an operator to avoid this ...
http://projects.ez.no/fetch_multilingual_url_alias_by_locale

hope that helps

Modified on Monday 22 August 2011 3:43:33 pm by Roman Hutterer

Wednesday 31 August 2011 3:24:42 pm

Thanks, actually we implemented an own operator in the meantime: https://github.com/holzweg/hwseo. Any suggestions are welcome.

Cheers,
Mathias

Modified on Wednesday 31 August 2011 3:25:13 pm by Mathias G

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from