PHP 5.4.33 Released

nl_langinfo

(PHP 4 >= 4.1.0, PHP 5)

nl_langinfo Retorna informação de linguagem e local

Descrição

string nl_langinfo ( int $item )

Aviso

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

add a note add a note

User Contributed Notes 2 notes

up
0
mark at moderndeveloper dot com
10 months 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:

<?php
echo IntlDateFormatter::formatObject(
         new
DateTime('2013-01-01 00:00:00 Europe/Moscow'),
        
'LLLL',
        
'ru_RU');
?>

Note that the format uses the ICU patterns, not the PHP date() patterns.
up
0
avatar_at_hot_ee
8 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.
To Top