Closed Bug 1098535 Opened 11 years ago Closed 11 years ago

Replace lang="en-US" with lang="en" to make the content region-neutral

Categories

(www.mozilla.org :: Pages & Content, defect)

Production
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: cmore, Assigned: kohei)

References

(Blocks 1 open bug)

Details

(Whiteboard: [kb=1578808] [fxgrowth])

Attachments

(1 file)

44 bytes, text/x-github-pull-request
Details | Review
www.mozilla.org and the content is not ranking well and is doing bizarre things when searching from google.ca. Google's language for that search engine defaults to lang="en-CA" and that's not a language that we use at Mozilla. Two options: 1) Activate the en-CA lang for mozilla.org and use all of he same strings as en-US. Seems kind of tricky do to do it site-wide, but I'll let the L10N folks gauge that. 2) Add meta tag pointing to en-US: <link rel="alternate" hreflang="en-CA" href="https://www.mozilla.org/en-US/" title="English (Canada)"> Seems like #1 would be better for search engines, but #2 would be much easier. We could start with #2 and then decide if we need to do anymore. The issue is that the en-US page would still have the en-US locale even though we would tell search engines that en-CA is actually on en-US. Looks like some en-CA movement in bug 551156 and bug 882315.
Whiteboard: [fxgrowth]
#1 would be painful to manage, it would not just mean copying files over from en-US, but also keeping them activated, updated and with the right tags to display updated content. If there's no team willing to keep en-CA updated for real, I wouldn't choose that option.
Let's start with #2 and monitor impact.
Whiteboard: [fxgrowth] → [kb=1578808] [fxgrowth]
I'm not sure #2 works, because it will redirects to the en-US equivalent anyway. #1 could be done by Bedrock tweaks without any language file maintenance. I'll figure out how to do it.
(In reply to Kohei Yoshino [:kohei] from comment #3) > #1 could be done by Bedrock tweaks without any language file maintenance. > I'll figure out how to do it. This code + empty /locale/en-CA/ directory should work. https://github.com/kyoshino/bedrock/compare/bug-1098535-o-canada But there is #3: Replace (href)lang="en-US" with (href)lang="en" in the templates to make the content region independent. URLs could stay as-is. https://support.google.com/webmasters/answer/189077
I think #3 is an option since google.com is set to "en". It does slightly scare me to change en-US to en given that en-US is the most visited locale. We still have en-GB on /firefox/new/ and all other en versions should then point to /en-US/ with a lang="en". I can't find any documentation saying #2 won't work, but it could confuse the search engines. The issue is that we are telling search engines that en-CA is at /en-US/ (URL doesn't really matter), but when they visit /en-US/ the html lang="en-US" and that doesn't match en-CA. I am sure the search engines check both the alternate URLs and the html lang value to determine the canonical URL for a language.
It would seem that symbolic links could be created to make en-US = en-CA at the system level, but that doesn't really apply to the application layer of django. It looks like Kohei's alias logic accomplishes that and doesn't require any duplicate l10n efforts. Kohei: do you think we need to worry about duplicate content with en-US and en-CA? They will 100% identical except for meta tags. It is possible that we don't have to worry about it because the meta tags tell the search engines where the home for each version is at. Still, they are the same strings.
Umm, duplicate content could be a problem here. Besides en-CA, there are also en-AU and en-NZ that we could support, so I guess #3 might be better. The code is simple: https://github.com/kyoshino/bedrock/compare/bug-1098535-english-region
(In reply to Kohei Yoshino [:kohei] from comment #7) > Umm, duplicate content could be a problem here. Besides en-CA, there are > also en-AU and en-NZ that we could support, so I guess #3 might be better. > The code is simple: > > https://github.com/kyoshino/bedrock/compare/bug-1098535-english-region Ok, can you do a PR with that change and r? jgmize and pmac? #3 seems to be the easiest way.
Will do.
Assignee: nobody → kohei.yoshino
Status: NEW → ASSIGNED
Component: L10N → Pages & Content
Summary: Add en-CA as a supported language on www.mozilla.org → Replace lang="en-US" with lang="en" to make the content region-neutral
Attached file pull request
There have been requests in the past to actually localize en-GB, does this change anything?
This won't affect en-GB or en-ZA at all.
Blocks: 745355
Commits pushed to master at https://github.com/mozilla/bedrock https://github.com/mozilla/bedrock/commit/79ac4364c28bcd06c40330334d0efa794a33effe Fix Bug 1098535 - Replace lang="en-US" with lang="en" to make the content region-neutral https://github.com/mozilla/bedrock/commit/8665845b2d9fc786b0a29dc1f0a0dd2e27c5f1e3 Merge pull request #2506 from kyoshino/bug-1098535-english-region Fix Bug 1098535 - Replace lang="en-US" with lang="en" to make the content region-neutral
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
This looks to be in prod: <html class="windows x86 no-js" lang="en" dir="ltr" data-latest-firefox="33.1.1" data-esr-versions="[31]"> <link rel="alternate" hreflang="en" href="https://www.mozilla.org/en-US/" title="English"> Thanks!
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: