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

[Feat]: Language Autodetect #560

Closed
Diewy opened this issue Aug 21, 2023 · 1 comment
Closed

[Feat]: Language Autodetect #560

Diewy opened this issue Aug 21, 2023 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@Diewy
Copy link
Contributor

Diewy commented Aug 21, 2023

Description

Hi,

Currently, the language autodetect feature in the browser works with only the language component, while the document mode uses the complete lang value. This results in differing outcomes for each detection method.

For instance, consider the case of "en-GB":

  • Browser mode: "en"
  • Document mode: "en-GB"

This inconsistency in the autodetection process can lead to confusion and discrepancies in the language identification.

Proposed solution

In an ideal scenario, the language autodetection process should prioritize finding translations for the complete lang code. If translations for the complete code are unavailable, the detection mechanism should then resort to searching for the language-only version.

Additional details

Any feedback on the proposed solution?
Before I look into creating a pull request, would you be open to considering this change in the v3 version?

Thanks!

@Diewy Diewy added the enhancement New feature or request label Aug 21, 2023
@github-actions github-actions bot added the triage yet to be reviewed label Aug 21, 2023
@orestbida
Copy link
Owner

Hi @Diewy, yes I fully agree with you! No ambiguity and it handles a wider range of use cases without introducing breaking changes. A PR is welcome!

@orestbida orestbida removed the triage yet to be reviewed label Aug 22, 2023
@orestbida orestbida added this to the v3.0.0-rc.17 milestone Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants