LX0-104 · 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 change the language of messages for an internationalized program 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
(46 responses)- B2% (1)
- C2% (1)
- D87% (40)
- E9% (4)
Why each option
To change the language of messages for an internationalized program to Portuguese, the `LC_MESSAGES` environment variable should be exported with the appropriate locale code, such as 'pt'.
While `LANGUAGE` can influence message language, `LC_MESSAGES` is the specific variable directly controlling message localization for applications.
`MESSAGE` is not a standard environment variable for locale settings to control message language.
`UI_MESSAGES` is not a standard environment variable for locale settings to control message language.
The `LC_MESSAGES` environment variable specifically controls the language used for program messages, including prompts, error messages, and informational output, in internationalized applications. Setting it to 'pt' will display messages in Portuguese if the locale is installed.
`ALL_MESSAGES` is not a standard environment variable for locale settings to control message language.
Concept tested: Linux locale environment variables
Source: https://man7.org/linux/man-pages/man7/locale.7.html
Topics
Community Discussion
No community discussion yet for this question.