Subject: multi language site

Posted on: 30/01/19 01:42am
By: ivy

This is multi language site.

top page: <= regist search engine

Thank you for adding hreflang code.

but now I have to add this code in header.thtml:

PHP Formatted Code

<?php if( COM_onFrontpage() ) { ?>
<link rel="alternate" href="{site_url}/index.php/topic/home_ja" hreflang="ja"{xhtml}>
<link rel="alternate" href="{site_url}/index.php/topic/home_en" hreflang="en"{xhtml}>
<link rel="alternate" href="{site_url}/index.php/topic/home_zh" hreflang="zh"{xhtml}>
<link rel="alternate" href="{site_url}/index.php/topic/home_ko" hreflang="ko"{xhtml}>
<link rel="alternate" href="{site_url}/" hreflang="x-default"{xhtml}>
<?php } ?>

and add hreflang="x-default" to language top page header.thtml

add this code in header.thtml:
PHP Formatted Code

<?php $url_current = COM_getCurrentURL(); if( strpos( $url_current, '/index.php/topic/home_' ) !== false ) { ?>
<link rel="alternate" href="{site_url}/" hreflang="x-default"{xhtml}>
<?php } ?>

other page are all okay.

but switchlang.php have problem, I think.

click "en" switchlang/en
display staticpages plugin en data. but topic title(center area top) is ja, and url is ja, too.

reflesh url en and display en topic.

1 language content 1 url for crawler.

Re: multi language site

Posted on: 18/04/19 11:49am
By: DavidS24

How did you optimize these websites? Any seo strategies?

Re: multi language site

Posted on: 15/07/19 02:18am
By: Anonymous

how can you handle this multi-language site

Geeklog - Forum