(PHP 4 >= 4.1.0, PHP 5)
nl_langinfo -- Rassemble des informations sur la langue et la configuration locale.nl_langinfo() est utilisée pour accéder à chaque élément de la configuration locale. Contrairement à la fonction localeconv() qui renvoie tous les éléments, nl_langinfo() vous permet de sélectionner un élément précis.
Si le paramètre item n'est pas valide, FALSE sera retourné.
item peut être la valeur entière d'un élément, ou le nom de sa contante. Voici une liste des noms de constantes pour item qui peuvent être utilisés et leurs descriptions. Certaines constantes peuvent ne pas être définies, ou ne contenir aucune valeur pour certaines locales.
Tableau 1. Constantes nl_langinfo()
Constante | Description |
---|---|
Constantes de la catégorie LC_TIME | |
ABDAY_(1-7) | Nom abbrévié du n-ème jour de la semaine. |
DAY_(1-7) | Nom du n-ème jour de la semaine (DAY_1 = Dimanche). |
ABMON_(1-12) | Nom abbrévié du n-ème mois de l'année. |
MON_(1-12) | Nom du n-ème mois de l'année. |
AM_STR | Chaîne pour Ante meridian. |
PM_STR | Chaîne pour Post meridian. |
D_T_FMT | Chaîne pouvant être utilisée comme chaîne de formatage pour la fonction strftime() pour représenter la date et l'heure. |
D_FMT | Chaîne pouvant être utilisée comme chaîne de formatage pour la fonction strftime() pour représenter la date. |
T_FMT | Chaîne pouvant être utilisée comme chaîne de formatage pour la fonction strftime() pour représenter l'heure. |
T_FMT_AMPM | Chaîne pouvant être utilisée comme chaîne de formatage pour la fonction strftime() pour représenter l'heure au format 12-heure avec ante/post meridian. |
ERA | Alternate era. |
ERA_YEAR | Year in alternate era format. |
ERA_D_T_FMT | Date and time in alternate era format (string can be used in strftime()). |
ERA_D_FMT | Date in alternate era format (string can be used in strftime()). |
ERA_T_FMT | Time in alternate era format (string can be used in strftime()). |
Constantes de la catégorie LC_MONETARY | |
INT_CURR_SYMBOL | International currency symbol. |
CURRENCY_SYMBOL | Local currency symbol. |
CRNCYSTR | Same value as CURRENCY_SYMBOL. |
MON_DECIMAL_POINT | Decimal point character. |
MON_THOUSANDS_SEP | Thousands separator (groups of three digits). |
MON_GROUPING | Like 'grouping' element. |
POSITIVE_SIGN | Sign for positive values. |
NEGATIVE_SIGN | Sign for negative values. |
INT_FRAC_DIGITS | International fractional digits. |
FRAC_DIGITS | Local fractional digits. |
P_CS_PRECEDES | Returns 1 if CURRENCY_SYMBOL precedes a positive value. |
P_SEP_BY_SPACE | Returns 1 if a space separates CURRENCY_SYMBOL from a positive value. |
N_CS_PRECEDES | Returns 1 if CURRENCY_SYMBOL precedes a negative value. |
N_SEP_BY_SPACE | Returns 1 if a space separates CURRENCY_SYMBOL from a negative value. |
P_SIGN_POSN |
|
N_SIGN_POSN | |
Constantes de la catégorie LC_NUMERIC | |
DECIMAL_POINT | Decimal point character. |
RADIXCHAR | Same value as DECIMAL_POINT. |
THOUSANDS_SEP | Separator character for thousands (groups of three digits). |
THOUSEP | Same value as THOUSANDS_SEP. |
GROUPING | |
Constantes de la catégorie LC_MESSAGES | |
YESEXPR | Regex string for matching 'yes' input. |
NOEXPR | Regex string for matching 'no' input. |
YESSTR | Output string for 'yes'. |
NOSTR | Output string for 'no'. |
Constantes de la catégorie LC_CTYPE | |
CODESET | Return a string with the name of the character encoding. |
Note : Cette fonction n'est pas implémentée sous Windows.
Voir aussi setlocale() et localeconv().
Précédent | Sommaire | Suivant |
money_format | Niveau supérieur | nl2br |