The Wayback Machine - https://web.archive.org/web/20210605140958/https://github.com/GoogleChrome/lighthouse/issues/12549
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document (or better document) how to use locale's & support non-english users #12549

Open
mgifford opened this issue May 23, 2021 · 2 comments
Open

Comments

@mgifford
Copy link

@mgifford mgifford commented May 23, 2021

Feature request summary
I could find some reference to the use of locale in the docs, but not which locale were supported? Can I get the interface in Spanish? The reports in Thai? What parameters are supported? Is there a list of supported strings to translate?

What is the motivation or use case for changing this?
Non-English users generally are not prioritizing accessibility https://webaim.org/projects/million/#languages but clearly accessibility isn't an English only issue.

How is this beneficial to Lighthouse?
It would help make a better, more inclusive web. Plus, not many are doing it now and it looks like you're further advanced than most.

@patrickhulce
Copy link
Collaborator

@patrickhulce patrickhulce commented May 24, 2021

Thanks for filing @mgifford! A "print available locales" from the CLI is a neat idea!

Lighthouse supports these non-English locales.

'ar-XB': require('./locales/ar-XB.json'), // psuedolocalization
'ar': require('./locales/ar.json'),
'bg': require('./locales/bg.json'),
'ca': require('./locales/ca.json'),
'cs': require('./locales/cs.json'),
'da': require('./locales/da.json'),
'de': require('./locales/de.json'), // de-AT, de-CH identical, so they fall back into de
'el': require('./locales/el.json'),
'en-XA': require('./locales/en-XA.json'), // psuedolocalization
'en-XL': require('./locales/en-XL.json'), // local psuedolocalization
'es': require('./locales/es.json'),
'es-419': require('./locales/es-419.json'),
// Aliases of es-419: https://raw.githubusercontent.com/unicode-cldr/cldr-core/master/supplemental/parentLocales.json
'es-AR': require('./locales/es-419.json'),
'es-BO': require('./locales/es-419.json'),
'es-BR': require('./locales/es-419.json'),
'es-BZ': require('./locales/es-419.json'),
'es-CL': require('./locales/es-419.json'),
'es-CO': require('./locales/es-419.json'),
'es-CR': require('./locales/es-419.json'),
'es-CU': require('./locales/es-419.json'),
'es-DO': require('./locales/es-419.json'),
'es-EC': require('./locales/es-419.json'),
'es-GT': require('./locales/es-419.json'),
'es-HN': require('./locales/es-419.json'),
'es-MX': require('./locales/es-419.json'),
'es-NI': require('./locales/es-419.json'),
'es-PA': require('./locales/es-419.json'),
'es-PE': require('./locales/es-419.json'),
'es-PR': require('./locales/es-419.json'),
'es-PY': require('./locales/es-419.json'),
'es-SV': require('./locales/es-419.json'),
'es-US': require('./locales/es-419.json'),
'es-UY': require('./locales/es-419.json'),
'es-VE': require('./locales/es-419.json'),
'fi': require('./locales/fi.json'),
'fil': require('./locales/fil.json'),
'fr': require('./locales/fr.json'), // fr-CH identical, so it falls back into fr
'he': require('./locales/he.json'),
'hi': require('./locales/hi.json'),
'hr': require('./locales/hr.json'),
'hu': require('./locales/hu.json'),
'gsw': require('./locales/de.json'), // swiss german. identical (for our purposes) to 'de'
'id': require('./locales/id.json'),
'in': require('./locales/id.json'), // Alias of 'id'
'it': require('./locales/it.json'),
'iw': require('./locales/he.json'), // Alias of 'he'
'ja': require('./locales/ja.json'),
'ko': require('./locales/ko.json'),
'lt': require('./locales/lt.json'),
'lv': require('./locales/lv.json'),
'mo': require('./locales/ro.json'), // Alias of 'ro'
'nl': require('./locales/nl.json'),
'nb': require('./locales/no.json'), // Alias of 'no'
'no': require('./locales/no.json'),
'pl': require('./locales/pl.json'),
'pt': require('./locales/pt.json'), // pt-BR identical, so it falls back into pt
'pt-PT': require('./locales/pt-PT.json'),
'ro': require('./locales/ro.json'),
'ru': require('./locales/ru.json'),
'sk': require('./locales/sk.json'),
'sl': require('./locales/sl.json'),
'sr': require('./locales/sr.json'),
'sr-Latn': require('./locales/sr-Latn.json'),
'sv': require('./locales/sv.json'),
'ta': require('./locales/ta.json'),
'te': require('./locales/te.json'),
'th': require('./locales/th.json'),
'tl': require('./locales/fil.json'), // Alias of 'fil'
'tr': require('./locales/tr.json'),
'uk': require('./locales/uk.json'),
'vi': require('./locales/vi.json'),
'zh': require('./locales/zh.json'), // aka ZH-Hans, sometimes seen as zh-CN, zh-Hans-CN, Simplified Chinese
'zh-HK': require('./locales/zh-HK.json'), // aka zh-Hant-HK. Note: yue-Hant-HK is not supported.
'zh-TW': require('./locales/zh-TW.json'), // aka zh-Hant, zh-Hant-TW, Traditional Chinese

A PR that adds a link to the above list is a nice first issue for any contributors looking to get started :)

@connorjclark
Copy link
Collaborator

@connorjclark connorjclark commented May 24, 2021

ref #10148

another good reason for that PR is apparent now: discoverability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants