102-500 · Question #1
Which of the following commands should be executed when starting a login shell in order to change the language of messages for an internationalized program to Portuguese (pt)?
The correct answer is B. export LC_MESSAGES="pt". LC_MESSAGES is the standard POSIX locale category variable specifically designed to control the language of user-visible messages in internationalized programs - setting it to "pt" instructs the system's locale infrastructure (via gettext/libintl) to load Portuguese message…
Question
Options
- Aexport LANGUAGE="pt"
- Bexport LC_MESSAGES="pt"
- Cexport UI_MESSAGES="pt"
- Dexport MESSAGE="pt"
- Eexport ALL_MESSAGES="pt"
How the community answered
(23 responses)- A9% (2)
- B74% (17)
- C13% (3)
- D4% (1)
Explanation
LC_MESSAGES is the standard POSIX locale category variable specifically designed to control the language of user-visible messages in internationalized programs - setting it to "pt" instructs the system's locale infrastructure (via gettext/libintl) to load Portuguese message catalogs. Options C (UI_MESSAGES), D (MESSAGE), and E (ALL_MESSAGES) are simply invented names that have no meaning to the shell or any standard library. Option A (LANGUAGE) is the tricky distractor: it is a GNU gettext extension that does influence message language in many programs, but it is not the standard POSIX locale category variable and is therefore not the correct answer in the context of POSIX/Linux certification exams.
Memory tip: All standard POSIX locale categories start with LC_ - LC_MESSAGES, LC_TIME, LC_NUMERIC, etc. If you remember that rule, you can instantly eliminate anything without the LC_ prefix.
Topics
Community Discussion
No community discussion yet for this question.