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

doc(localizer): add specification about language tag detection #270

Merged
merged 1 commit into from
Mar 12, 2022

Conversation

ColinBoisLydia
Copy link
Contributor

I've been stumbling across a frustrating issue with the underlying tag detection from x/text/language.Matcher: the detection algorithm will return a tag value based on a given score who can be surprising.

Because it is not a bug, I just updated the documentation of Localizer in order to give some hint for future user.

I did two go-playground to show this more specifically https://go.dev/play/p/TMoszzbeEZ2

Here is a link to a related Github issue in x/text/language: golang/go#49176

@nicksnyder
Copy link
Owner

Thanks for digging in to this! Is there any way we could make the comment more specific about how the ordering in memory might impact the result (potentially even linking to the issues)?

@ColinBoisLydia
Copy link
Contributor Author

You're welcome! I added an example in order to be a little less nebulous along with a link to the Github issue and the Go code base which contains a tone of informations

Thank you for this pkg :-)

@nicksnyder nicksnyder merged commit 639caa7 into nicksnyder:main Mar 12, 2022
@bep bep mentioned this pull request Aug 5, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants