# ICU/intl: list locales?

- Thread: https://externals.io/message/70179
- Original archive: https://news-web.php.net/php.internals/70179
- Started by Martin Keckeis on 2013-11-18T08:02:17+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #70179 — Martin Keckeis — 2013-11-18T08:02:17+00:00

URL: https://externals.io/message/70179#70179

Hello together,

is there a way to get the locale list out of ICU, like listed here:
http://demo.icu-project.org/icu-bin/locexp

I would also need the "windows Id" for it, which seems also be defined:

---

## #70180 — Pierre Joye — 2013-11-18T08:12:02+00:00

URL: https://externals.io/message/70179#70180 · In reply to: #70179

hi,

On Mon, Nov 18, 2013 at 9:02 AM, Martin Keckeis
<martin.keckeis1@gmail.com> wrote:
> Hello together,
>
> is there a way to get the locale list out of ICU, like listed here:
> http://demo.icu-project.org/icu-bin/locexp
>
> I would also need the "windows Id" for it, which seems also be defined:


http://www.php.net/manual/en/intlcalendar.getavailablelocales.php

Please ask end user questions on the general mailing list, this list
is about developing the language :)

Cheers.
-- 
Pierre

@pierrejoye | http://www.libgd.org

---

## #70181 — Martin Keckeis — 2013-11-18T08:56:43+00:00

URL: https://externals.io/message/70179#70181 · In reply to: #70180

Hello Pierre,

2013/11/18 Pierre Joye <pierre.php@gmail.com>

> hi,
>
> On Mon, Nov 18, 2013 at 9:02 AM, Martin Keckeis
> <martin.keckeis1@gmail.com> wrote:
> > […]
>
>
> http://www.php.net/manual/en/intlcalendar.getavailablelocales.php
>
> Please ask end user questions on the general mailing list, this list
> is about developing the language :)
>
>
Because search results, pointed me to a direction, that this feature is
currently not available, i though internals is the way to go. Next time i
will ask my question in the right list, sorry for this.

Thanks a lot for the answer!



Shouldn't this method be place (also) in Locale class? Also the
Method: getKeywordValuesForLocale
Most people won't search this in the Calendar class, but in Locale where
already such methods are available.


There are a lot of definitions/rules inside of the locale, which are
"partly" accessable (
http://demo.icu-project.org/icu-bin/locexp?d_=de&_=de_AT)
- number formatting rules
- day names
- ...

But some things are not accessible like:
- windows locale id
- output the sort rule (sorting can be done, but no output for the rule
itself)
- ...


A method to directly read the ICU data would be great for this.



Best regards
Martin
