I’m bad at English forgive me and try to understand me
** I try Multi-language ** with a database (mysqli)
** But I’m having trouble with SEO ** I created a table in such database
https://imgbbb.com/image/RgT9r
And I have programmed the class to select the language automatically and change the language and so on
my question is
which language Google will use (when user search for any thing)
An example in register page i will put multi language button
<button><?php Lang::main('RGISTER') ?></button>
How can I put the registration page in the robots file (sitemap) in two languages, namely Arabic and English
2
Answers
According to this google support article(Tell Google about localized versions of your page) and this user’s question(How can I add meta tag for multi-lingual website?) a right way would be to use a alternate meta link to your multilingual content.
Google article suggest also other useful tips and techniques for this problem.
Tells that the current page is also available in espanjol on this url:
A few essential items to ensure you’ve addressed when supporting internationalization of a website:
lang
attribute, declaring the on-page content’s language (<html lang="ja">...</html>
)<head>
with absolute URLs of the alternate versions/translations and ISO 639-1 Language Codeshreflang
attribute. Important to also add a self-referencing element for the current page, itself.Example: Current webpage is in English, yet also have Japanese-translated version of that webpage – declare
<html lang="en">...</html>
and within<head>
add:Also add language/locale versions/references in the
sitemap.xml
file(s) of your website and it’s always a good idea to set absolutecanonical
on each page.Also have consistency, site-wide, in either ccTLD, subdirectory/subfolder, subdomain, etc.
More reading from Google Search Console support (covers sitemap support).