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)?
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)?
A . export LANGUAGE="pt"
B . export MESSAGE="pt"
C . export UI_MESSAGES="pt"
D . export LC_MESSAGES="pt"
E . export ALL_MESSAGES="pt"
Answer: D
Explanation:
The LC_MESSAGES environment variable specifies the language to use in diagnostic messages for an internationalized program. It can be set to any value supported by the installation, such as pt for Portuguese, en for English, fr for French, etc. The LC_MESSAGES variable can be set either globally in a shell profile file, such as /etc/bash_profile, or locally in a shell session.
For example, to set the language of messages to Portuguese for the current shell session, one can use the following command:
export LC_MESSAGES=pt
To verify the change, one can run an internationalized program, such as man, and see the output in Portuguese. The LC_MESSAGES variable can also be used to run a single command with a different language without affecting the system’s language. For example, to run the man command with the Spanish language, one can use the following syntax: LC_MESSAGES=es man
The LC_MESSAGES variable is useful for testing how programs behave in different languages or for displaying messages in different languages1234.
Reference: Locale Environment Variables in Linux | Baeldung on Linux Linux / UNIX: TZ Environment Variable – nixCraft Changing your locale on Linux and UNIX systems – IBM Selecting message language in gcc and g++ – Stack Overflow
Latest 102-500 Dumps Valid Version with 194 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund