LFCS · Question #76
Which of the following commands should be added to /etc/bash_profile in order to change the language of messages for an internationalized program to Portuguese (pt)?
The correct answer is D. export LC_MESSAGES="pt". To set the language for program messages to Portuguese, the LC_MESSAGES environment variable should be exported with the appropriate locale code, such as 'pt'.
Question
Options
- Aexport LANGUAGE="pt"
- Bexport MESSAGE="pt"
- Cexport UI_MESSAGES="pt"
- Dexport LC_MESSAGES="pt"
- Eexport ALL_MESSAGES="pt"
How the community answered
(51 responses)- B2% (1)
- C4% (2)
- D94% (48)
Why each option
To set the language for program messages to Portuguese, the `LC_MESSAGES` environment variable should be exported with the appropriate locale code, such as 'pt'.
While `LANGUAGE` can influence message selection, `LC_MESSAGES` is the specific variable for setting the message language for an internationalized program.
`MESSAGE` is not a standard environment variable used for setting the language of program messages.
`UI_MESSAGES` is not a standard environment variable used for setting the language of program messages.
The `LC_MESSAGES` environment variable specifically controls the language used for program messages, prompts, and informational output, and exporting it as 'pt' will set the message language to Portuguese.
`ALL_MESSAGES` is not a standard environment variable used for setting the language of program messages.
Concept tested: Locale environment variables
Source: https://man7.org/linux/man-pages/man7/locale.7.html
Topics
Community Discussion
No community discussion yet for this question.