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

Should locale parameter accept an optional array? #16

Open
davidbarratt opened this issue Aug 14, 2019 · 0 comments
Open

Should locale parameter accept an optional array? #16

davidbarratt opened this issue Aug 14, 2019 · 0 comments

Comments

@davidbarratt
Copy link
Member

davidbarratt commented Aug 14, 2019

Sometimes the user provides (via the Accept-Language header) a list of languages that they know:

Accept-Language: en-US;q=0.8,es;q=0.5,ja;q=0.3

since the user is providing a list of languages, it might be helpful to accept that list as fallbacks.

For instance, based on that header, I would generate this list:

en-US
es
ja

and I would expect it to fallback like this:

en-US
en
es
ja

Perhaps the locale could accept a string or an array of strings? What do you think?

@davidbarratt davidbarratt changed the title Should locale parameter accept an array? Should locale parameter accept an optional array? Aug 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant