• Resolved Amrit Ray

    (@amritray)


    I have a multisite running using multilingualPress plugin.
    One is English and the other is Espa?ol de México.

    The hreflang tag for Spanish is displaying as: hreflang=”es-MX”
    Is it possible to show it as “es-US” ?

    How should I go about doing this?

    Any help is much appreciated.

    Thanks,
    Amrit

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey Amrit,

    yes, you can change the language’s properties in the Language Manager settings page (to be found in the Network Admin: Settings -> Language Manager). Just find it, adapt it to your needs, save, done.

    However, Espa?ol de México is, by definition, the Spanish that is being spoken in Mexico, the country. So the language code es-MX is perfectly valid here.
    If you want to target Spanish speaking people in the United States, then I suggest to edit an existing language that you don’t need (e.g., Klingon :D) and make it something like Spanish (United States), with codes es-US etc.

    Cheers,
    Thorsten

    Thread Starter Amrit Ray

    (@amritray)

    Hey Thorsten,

    Thanks for getting back to me with an answer. And thanks for explaining it in so much detail. Yes, actually the idea is to target Spanish speaking people in the United States.

    I actually changed the language Klingon to the one you suggested ??
    It saved the data.

    But when I go to My Sites -> Spanish (version) -> Dashboard -> Settings
    Under “Site Language” I don’t see the new langugae ()

    However, when I go to Network Admin -> Sites -> Edit (Spanish Site)
    Under Multilingual Press tab, I see the option “Spanish US” option that I just created.
    My question is, if I change the language here, will it change the language for the Spanish site? Do I need to make any other changes in other places?

    Thanks for helping me out here ??

    Thanks,
    Amrit

    Hi Amrit,

    ah, yes, this is a little confusing, at first.

    When you are in the admin area of a site, the language that you see on the General Settings page is the system language. This means that it is being used for translatable strings, both for the back end and the front end.

    When you edit a site in the network admin, the language in the MultilingualPress tab is the content language. This means it is being used for the hreflang and lang attributes in your markup.

    Usually, both languages are set to the same value. Sometimes, however, this is either not possible (e.g., there is no es_US WordPress locale), or actually not desired.

    In your case, just set the WordPress language (i.e., on the General Settings page) to Espa?ol, and choose your new Spanish (US) for the site in the MultilingualPress tab.

    Cheers,
    Thorsten

    Thread Starter Amrit Ray

    (@amritray)

    Thanks Thorsten for taking the time to explain everything so beautifully. The issue is now solved. I know what to do ?? Thanks again.

    Cheers,
    Amrit

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can I use custom hreflang tag?’ is closed to new replies.