79820419

Date: 2025-11-14 20:30:07
Score: 4.5
Natty:
Report link

I'm trying to set the locale based on the user's browser preferences from the Accept-Language header. If the first preference doesn't work, because the locale is not available, I want to fall back to the next one. So I need to know whether setlocale() genuinely succeeded. If the intl extension is installed then I can test as above, but if not?

Reasons:
  • Blacklisted phrase (0.5): I need
  • RegEx Blacklisted phrase (1): I want
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Greenflash