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

Language Handling #60

Open
AldaronLau opened this issue Dec 26, 2022 · 3 comments
Open

Language Handling #60

AldaronLau opened this issue Dec 26, 2022 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted question

Comments

@AldaronLau
Copy link
Member

Currently, on Unix-like platforms for English speakers in the US, something along the lines of ["en-US", "en"] will be reported by lang(). On Windows, just ["en-US"] will be reported. How should language fallbacks be expected to be handled? It would be nice to have some kind of consistency here.

@AldaronLau AldaronLau added enhancement New feature or request help wanted question good first issue Good for newcomers labels Dec 26, 2022
@AldaronLau
Copy link
Member Author

Not sure on exact language tags, but for example, if the user prefers ["en-CN", "en-GB", "zh-CN"], then I'm assuming that if all else fails, they would prefer next (for fallback) ["en", "zh"] (requesting any dialect for English first, then any dialect of Chinese second). But, the question is whether or not whoami should append these any dialect language codes?

@AldaronLau
Copy link
Member Author

I think the answer to this question depends on whether or not it's supported to select "any" dialect from the OS dialogues (needs some research).

@AldaronLau
Copy link
Member Author

Upon further research it appears as though it's possible to select "any", at least on Linux. WhoAmI should not automatically insert the language without the dialect. Although, since it is a fallback list, any dialect could be appended at the end of the list:

["en-CN", "en-GB", "zh-CN"] -> ["en-CN", "en-GB", "zh-CN", "en", "zh"]
["en-CN", "en", "zh-CN"] -> ["en-CN", "en", "zh-CN", "zh"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted question
Projects
None yet
Development

No branches or pull requests

1 participant