Is PHP using my operating system's "locales" or its own baked-in ICU locale data?

1

The following function supposedly lets me list the installed locales on the computer: https://www.php.net/resourcebundle_locales

It wants me to specify a "bundle name". I have no idea what a "resource bundle" is, even after reading this page: https://www.php.net/manual/en/class.resourcebundle.php

As a user-contributed comment says, you have to feed that function an empty string to get "a list of all locales available in the ICU library"... Which is what I always do to determine if the locale exists or not. I have never fed it a "resource bundle" because I don't understand what that is or what it means by it. Is it talking about some kind of file or dir structure supposedly existing on Windows 10? Or is it Linux only?

Am I seeing a list of locales supported by ICU, bundled with PHP, or by my computer/OS? The documentation is utterly cryptic and confusing, as so often is the case, forcing me to ask about it and waste my own time and energy as well as the time and energy of others for no good reason. But what else can I do when I don't understand what it's talking about?

If there are already all these locales bundled with PHP, in the form of "ICU data", what is the benefit of specifying "another locale repository"? (That's what I assume the function parameter is doing.)

Olena Andrews

Posted 2020-01-30T17:21:30.067

Reputation: 11

Question was closed 2020-01-30T19:24:27.990

No answers