skip to Main Content

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


  1. 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:

    <link rel="alternate" href="http://example.com/es" hreflang="es" />
    
    Login or Signup to reply.
  2. A few essential items to ensure you’ve addressed when supporting internationalization of a website:

    • Set the HTML lang attribute, declaring the on-page content’s language (<html lang="ja">...</html>)
    • Add link elements in the <head> with absolute URLs of the alternate versions/translations and ISO 639-1 Language Codes hreflang 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:

    <link rel="alternate" hreflang="en" href="https://example.com/en/" />
    <link rel="alternate" hreflang="ja" href="https://example.com/ja/" />
    

    Also add language/locale versions/references in the sitemap.xml file(s) of your website and it’s always a good idea to set absolute canonical 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).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search