# info > I18N::Langinfo

---
type: CommandReference
command: I18N::Langinfo
mode: perldoc
section: 3perl
source: perldoc
---

## Quick Reference
- `use I18N::Langinfo qw(langinfo ABDAY_1); my $day = langinfo(ABDAY_1);` — get abbreviated first day of week
- `use I18N::Langinfo qw(langinfo CODESET); print langinfo(CODESET);` — character encoding of current locale
- `use I18N::Langinfo qw(langinfo D_FMT); my $fmt = langinfo(D_FMT);` — locale’s date format string
- `use I18N::Langinfo qw(langinfo CRNCYSTR); my $cur = langinfo(CRNCYSTR);` — currency symbol
- `use I18N::Langinfo qw(langinfo YESSTR NOSTR); my ($y,$n) = (langinfo(YESSTR),langinfo(NOSTR));` — yes/no strings
- `use I18N::Langinfo qw(langinfo RADIXCHAR); say langinfo(RADIXCHAR);` — decimal separator character

## Name
`I18N::Langinfo` — query locale information

## Synopsis
perl
use I18N::Langinfo;
use I18N::Langinfo qw(langinfo CONSTANT ...);
## Options
The `langinfo()` function accepts one of the following numeric constants (exportable from the module):

### Days and Months
- `ABDAY_1` … `ABDAY_7` — abbreviated day names (Sunday = 1)
- `DAY_1` … `DAY_7` — full day names
- `ABMON_1` … `ABMON_12` — abbreviated month names
- `MON_1` … `MON_12` — full month names

### Date/Time Formats
- `D_T_FMT` — date and time format string (for `strftime`)
- `D_FMT` — date format
- `T_FMT` — time format
- `T_FMT_AMPM` — 12‑hour time format
- `AM_STR`, `PM_STR` — AM/PM strings

### Encoding and Currency
- `CODESET` — character encoding name (e.g., `"UTF-8"`, `"ISO-8859-1"`)
- `CRNCYSTR` — currency symbol

### Numeric Formatting
- `RADIXCHAR` — decimal point character
- `THOUSEP` — thousands separator
- `ALT_DIGITS` — alternate digit representation

### Yes/No Responses
- `YESSTR`, `NOSTR` — affirmative and negative answer strings (deprecated in POSIX 2008)
- `YESEXPR`, `NOEXPR` — regular expressions for affirmative/negative responses

### Era Information (where applicable)
- `ERA` — era name
- `ERA_D_FMT`, `ERA_T_FMT`, `ERA_D_T_FMT` — era date/time formats

On systems without native `nl_langinfo`, many constants return approximate or empty values; see the module’s documentation for details.

## Examples

### Basic usage
perl
use I18N::Langinfo qw(langinfo ABDAY_1 YESSTR NOSTR);

my ($abday_1, $yesstr, $nostr) =
    map { langinfo($_) } (ABDAY_1, YESSTR, NOSTR);

print "$abday_1? [$yesstr/$nostr] ";
### Query date/time format
perl
use I18N::Langinfo qw(langinfo D_T_FMT);
print "Date/time format: ", langinfo(D_T_FMT), "\n";
## See Also
- [perllocale](https://perldoc.perl.org/perllocale)
- [POSIX::localeconv](https://perldoc.perl.org/POSIX#localeconv)
- [POSIX::setlocale](https://perldoc.perl.org/POSIX#setlocale)
- [nl_langinfo(3)](https://linux.die.net/man/3/nl_langinfo)