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

Request: provide way to set language attribute when spinning up a new app #8599

Closed
MelSumner opened this issue Apr 18, 2019 · 4 comments
Closed

Comments

@MelSumner
Copy link
Contributor

When I create a new Ember app, I have this accessibility issue immediately:

image

One solution would be to change <html> to <html lang="en">, but perhaps we could also do something more inclusive. Would there be a way to have a language set by default but make setting a different language available via an option in ember new?

Thank you for considering.

@rwjblue
Copy link
Member

rwjblue commented Apr 19, 2019

TBH, I don't think there is a reasonable way for us to default this. Adding "yet another" flag you have to remember to ember new is not good, and using "en" as the default seems fundamentally wrong to me.

See these issues/PRs for previous conversation/thought about this:

One possibility is to ensure that lang is added by the user (via either an automatic test included in the app, a lint rule, etc). This kinda sucks too (generating a new app with failing tests feels bad), but at least doesn't default to excluding non-english folks...

@mehulkar
Copy link
Contributor

One thing my team has considered in the past is to build per locale so that we can precompile localized templates instead of fetching translations at runtime. Instead of at ember new time, if we built this into ember build, those builds could add the lang attribute?

I'm thinking something like ember build --lang "en" or ember build --languages config/locales.js.

(Discovered this while reading learning team meeting notes)

@stefanpenner
Copy link
Contributor

@rwjblue I don't think defaulting to en is an issue. In-fact our welcome page is clearly written in english today. Would would make it more honest than anything.

Until such time as we want to bake in some broader i18n solution, defaulting to en is fine.

@MelSumner
Copy link
Contributor Author

MelSumner commented Sep 22, 2019

@rwjblue @stefanpenner I'd like to have this issue closed as a won't fix or work on a way to move this forward, please. What do you think?

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

No branches or pull requests

4 participants