(PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8)

nl_langinfo Retorna informação de linguagem e local


nl_langinfo(int $item): string


Esta função não está documentada; apenas a lista de argumentos está disponível.

add a note

User Contributed Notes 2 notes

17 years ago
The value MON_(1-12) has special behavior in Russian locale: it returns declinated month names, that can be used as part of a date string, but not on their own.

For instance instead of "Январь" (the proper nominative form) it returns "Января" (form declinated for use in dates).

There seems to be no way to get the nominative form of the month name - one has to use translations instead.
mark at moderndeveloper dot com
9 years ago
If you are looking for the stand-alone (nominative form) of a month, you may not be able to use nl_langinfo(), but with PHP 5.5 you can use something like:

echo IntlDateFormatter::formatObject(
DateTime('2013-01-01 00:00:00 Europe/Moscow'),

Note that the format uses the ICU patterns, not the PHP date() patterns.
To Top