-
Notifications
You must be signed in to change notification settings - Fork 62
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
Does not work with single language #102
Comments
Did you find any another working library? |
Same issue here with I have a computer where Edge returns only:
And $negotiator->getBest('fr-FR', ['en', 'fr']); // returns NULL |
Just found out that the issue was already fixed on 2.x branch, but no new tag have been created since a while. You need configure your composer.json to use the current 2.x branch to get the fix:
|
This should be greatly appreciated to create a new release 2.3.2 with this fix (for PHP 5.x) |
@willdurand I tested the new 3.0.0 tag but this issue is still here. This can be easily reproduced with: $negotiator = new \Negotiation\LanguageNegotiator();
$bestLanguage = $negotiator->getBest('fr-FR', ['en', 'fr']); // returns NULL When using $negotiator = new \Negotiation\LanguageNegotiator();
$bestLanguage = $negotiator->getBest('fr-FR', ['en', 'fr']); // returns fr it looks like one fix applied to |
mm interesting and sorry about that. Maybe I should have merged |
I didn't try it but #113 looks to be the missing fix |
I'll take a look this week. |
Hello @willdurand, any news on this? |
should be fixed by #113, I am sorry that this took almost a year. |
When youve only selected a single language in your browser (I tried it in Firefox 68) the library will not detect the language.
The header sent is:
The text was updated successfully, but these errors were encountered: