If the default site language "remove url language code" is checked - the mod_language language switcher still adds the language code.
I have applied this to J3.4:
2286521#commitcomment-10992787
The above correctly removes /tw/ from rel="alternate":
<link href="http://localhost/htw3/index.php/about/doctors" rel="alternate" hreflang="zh-TW" />
However the language switcher - still adds /tw/:
<div class="mod-languages">
<ul class="lang-inline">
<li class="" dir="ltr"> <a href="/htw3/index.php/tw/about/doctors"> 中文 </a> </li>
<li class="lang-active" dir="ltr"> <a href="/htw3/index.php/en/about/doctors"> English </a> </li>
</ul>
</div>
Any ideas?
Labels |
Added:
?
|
Category | ⇒ | Multilanguage |
My reason for asking is won't the redirect affect SEO:
"The link to "http://localhost/htw3/index.php/tw/" has resulted in HTTP redirection to "http://localhost/htw3/index.php/".
Search engines can only pass page rankings and other relevant data through a single redirection hop. Using unnecessary redirects can have a negative impact on page ranking."
Redirects also slow down page load.
We have one redirect only.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-05-05 06:54:10 |
Closed_By | ⇒ | infograf768 |
Closing. Thanks for your concern.
Set to "closed" on behalf of @infograf768 by The JTracker Application at issues.joomla.org/joomla-cms/6874
The behaviour IS correct. No bug here at all
For a site where en-GB is the default site and Remove URL Language Code is set to Yes, we will get as alternate:
and the switcher will have the /en/ because it is After clicking on the switcher that the url language code is removed.
Alternate will work as desired.