nerdexam
LPI

201-450 · Question #177

Messages from programs are not appearing in the user's native language. What environment variable must be set for this to happen?

The correct answer is A. LANG. LANG is the standard POSIX environment variable that controls the locale for a process, including the language used for program messages, date formats, number formats, and more. When set (e.g., LANG=fr_FR.UTF-8), programs that support internationalization (i18n) will display…

207 System Maintenance

Question

Messages from programs are not appearing in the user's native language. What environment variable must be set for this to happen?

Options

  • ALANG
  • BI18N
  • CMESSAGES
  • DMSGS
  • ELC_MSGS

How the community answered

(42 responses)
  • A
    83% (35)
  • B
    10% (4)
  • C
    5% (2)
  • E
    2% (1)

Explanation

LANG is the standard POSIX environment variable that controls the locale for a process, including the language used for program messages, date formats, number formats, and more. When set (e.g., LANG=fr_FR.UTF-8), programs that support internationalization (i18n) will display output in the specified language.

The distractors are wrong for these reasons:

  • B (I18N) - not a real environment variable; "i18n" is just shorthand for "internationalization" as a concept
  • C (MESSAGES) - not a standard environment variable; sounds plausible but doesn't exist in POSIX
  • D (MSGS) - similarly fabricated; no such standard variable
  • E (LC_MSGS) - close but incorrect; the real variable is LC_MESSAGES (plural, with an "E"), which overrides LANG specifically for message catalogs - but LANG is the foundational variable that must be set first and is what the question is testing

Memory tip: Think "LANG = Language" - it's the master locale switch. All LC_* variables (like LC_MESSAGES, LC_TIME, LC_NUMERIC) override specific aspects of LANG, but LANG is the one variable you must set to get translated messages at all.

Topics

#localization#LANG#environment variables#i18n

Community Discussion

No community discussion yet for this question.

Full 201-450 Practice