Mobile app version of vmapp.org
Login or Join
Si4351233

: Multilanguage SEO and site map I make a multilanguage web. I change language dynamically with php. When user click on any language from dropdown box, they call translated file (lang.eng.php, lang.es.php,

@Si4351233

Posted in: #Multilingual #Php #Seo

I make a multilanguage web. I change language dynamically with php. When user click on any language from dropdown box, they call translated file (lang.eng.php, lang.es.php, lang.de.php etc.) Default language is English.
this is how my dropdown looks

<ul>
<li><a href="/en/<?= $page ?>"><span class="flag-icon flag-icon-us"></span> English</a></li>
<li><a href="/fr/<?= $page ?>"><span class="flag-icon flag-icon-fr"></span> French</a></li>
<li><a href="/es/<?= $page ?>"><span class="flag-icon flag-icon-es"></span> Spanish</a></li>
<li><a href="/it/<?= $page ?>"><span class="flag-icon flag-icon-it"></span> Italian</a></li>
<li><a href="/hr/<?= $page ?>"><span class="flag-icon flag-icon-hr"></span> Croatian</a></li>
<li><a href="/de/<?= $page ?>"><span class="flag-icon flag-icon-de"></span> German</a></li>




hint: $page = opened_state


With .htaccess I change params ssss.com/en/index?$page?=en to ssss.com/en/index or ssss.com/fr/about etc. depending of selected state.

In every .php on my web page (index.php, about.php, contact.php etc) in <head></head> I set

<link rel="alternate" href and hreflang>

index.php
<link rel="alternate" href="https://ssss.com/en/index/" hreflang="en">
<link rel="alternate" href="https://ssss.com/fr/index/" hreflang="fr">
<link rel="alternate" href="https://ssss.com/de/index/" hreflang="de">

about.php
<link rel="alternate" href="https://ssss.com/en/about/" hreflang="en">
<link rel="alternate" href="https://ssss.com/fr/about/" hreflang="fr">
<link rel="alternate" href="https://ssss.com/de/about/" hreflang="de">

etc.


Every one of this links working nice when navigating on web page.

Is this ok for Google SEO optimization on all language on my web page?

When I try to generate site-map with online generator I only get /en/ links

Do you have any suggestion?
Does google see all of my languages in this way?

Thnx

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Si4351233

1 Comments

Sorted by latest first Latest Oldest Best

 

@Megan663

Based on how I'm reading your post, it all looks good to me. If a user selects their language your htaccess redirects them to the correct language directory. Google should be able to crawl all of these links and discover the different languages on your pages.

I recommend that you fetch your alternate language pages with Google fetch and render tool. This is a pretty essential standard to see how Google views your page. The rendered image output will tell you what language Google reads your links in.
search.google.com/test/mobile-friendly?utm_source=gws https://www.google.com/webmasters/tools/googlebot-fetch

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme