willdurand / Negotiation

Content Negotiation tools for PHP.
https://williamdurand.fr/Negotiation/
MIT License
1.41k stars 62 forks source link

Doesn't work on Safari. #103

Closed Marcin-TA closed 2 years ago

willdurand commented 5 years ago

What isn't working exactly?

Marcin-TA commented 5 years ago

It doesn't detect the Safari default language. I use version 2.3.1 of the lib. Basically, Safari returns e.g. en-gb for $_SERVER['HTTP_ACCEPT_LANGUAGE']. However, the negotiator class throws an exception when I call getType() method.

Marcin-TA commented 5 years ago

@here For future reference, I recommend to install PHP extension ext-intl and use this: https://www.php.net/manual/en/locale.lookup.php

willdurand commented 2 years ago

should be fixed by https://github.com/willdurand/Negotiation/pull/113