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.
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?
I can’t post it here at this time, can you email jimlongo56 at gmail and I’ll send it to you.
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=”http://local.dev/us/” rel=”alternate” />
<link hreflang=”en-ca” href=”http://local.dev/ca/” rel=”alternate” />
<link hreflang=”fr-ca” href=”http://local.dev/fr/” rel=”alternate” />
<link hreflang=”en-au” href=”http://local.dev/au/” rel=”alternate” />
<link hreflang=”x-default” href=”http://local.dev/us/” rel=”alternate” />
However the URLs are still like this
http://local.dev/us/foo/
Plugin Author
Gunu
(@grafcom)
<link hreflang=”en-us” href=”http://local.dev/us/” rel=”alternate” />
give in the URL us
<link hreflang=”en-ca” href=”http://local.dev/ca/” rel=”alternate” />
give in the URL ca
<link hreflang=”fr-ca” href=”http://local.dev/fr/” rel=”alternate” />
give in the URL fr
<link hreflang=”en-au” href=”http://local.dev/au/” 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
Okay.
Then the setting Locale at front-end does not do what I need it to?
I need the URL to be http://local.dev/en-us/foo/ NOT http://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