正解:D
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. References:
* 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