Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Gunu

    (@grafcom)

    @jimlongo

    tried this: Settings – Languages – Languages

    use – Locale at front-end

    Locale to be used in browser at front-end to set “hreflang” HTML attributes to specify alternative languages on a page. If left empty, then “Language Code” is used by default.

    Thread Starter jimlongo

    (@jimlongo)

    Yes thank you.

    I also had tried that, but again any settings I put there get lost when I navigate away from that page and come back to it

    Plugin Author Gunu

    (@grafcom)

    can you give me a link to your site?

    Thread Starter jimlongo

    (@jimlongo)

    I can’t post it here at this time, can you email jimlongo56 at gmail and I’ll send it to you.

    Thread Starter jimlongo

    (@jimlongo)

    Following your last direction on my local install, I was able to change the Locale at front-end settings to en-us, etc.,

    This outputs the following to the browser . . .
    <link hreflang=”en-us” href=”https://local.dev/us/&#8221; rel=”alternate” />
    <link hreflang=”en-ca” href=”https://local.dev/ca/&#8221; rel=”alternate” />
    <link hreflang=”fr-ca” href=”https://local.dev/fr/&#8221; rel=”alternate” />
    <link hreflang=”en-au” href=”https://local.dev/au/&#8221; rel=”alternate” />
    <link hreflang=”x-default” href=”https://local.dev/us/&#8221; rel=”alternate” />

    However the URLs are still like this
    https://local.dev/us/foo/

    Plugin Author Gunu

    (@grafcom)

    <link hreflang=”en-us” href=”https://local.dev/us/&#8221; rel=”alternate” />
    give in the URL us
    <link hreflang=”en-ca” href=”https://local.dev/ca/&#8221; rel=”alternate” />
    give in the URL ca
    <link hreflang=”fr-ca” href=”https://local.dev/fr/&#8221; rel=”alternate” />
    give in the URL fr
    <link hreflang=”en-au” href=”https://local.dev/au/&#8221; rel=”alternate” />
    give in the URL au
    Right?
    This is correct. The Locale at front-end is only for search engines to detect the specify alternative en languages

    Thread Starter jimlongo

    (@jimlongo)

    Okay.

    Then the setting Locale at front-end does not do what I need it to?

    I need the URL to be https://local.dev/en-us/foo/ NOT https://local.dev/us/foo/

    How can I accomplish that?

    Thank you.

    Plugin Author Gunu

    (@grafcom)

    this is not in the design.

    2-Letter ISO Language Code for the Language you want to insert. (Example: en)
    The language code is used in language tags and in URLs. It is case sensitive. Use of lower case for the language code is preferable, but not required. The code may be arbitrary chosen by site owner, although it is preferable to use already commonly accepted code if available. Once a language code is created and entries for this language are made, it is difficult to change it, please make a careful decision.

    Maybe a request for an adjustment, please, continue this discussion with an issue at GitHub

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Custom URL settings’ is closed to new replies.