on-internet
← Community

Why does PHP on Windows allow a non-existent locale to be set?

Stack Overflow ·

If I run var_dump(setlocale(LC_ALL, 'xyz.utf-8')); on Windows I get string(9) "xyz.utf-8" despite the fact that 'xyz' is not advertised in ResourceBundle::getLocales('') and having apparently set the locale to 'xyz' the output of strftime() is still in English (on my system). (I know strftime() is deprecated.) In fact Windows seems to accept any three character string. Only when I try something like 'wxyz.utf-8' does it returnfalse. Why?

Comments

Sign in or sign up to comment and upvote.

No comments yet.