nerdexam
Linux_Foundation

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'.

Submitted by rohit_dlh· Apr 18, 2026Essential Commands

Question

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)?

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)
  • B
    2% (1)
  • C
    4% (2)
  • D
    94% (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'.

Aexport LANGUAGE="pt"

While `LANGUAGE` can influence message selection, `LC_MESSAGES` is the specific variable for setting the message language for an internationalized program.

Bexport MESSAGE="pt"

`MESSAGE` is not a standard environment variable used for setting the language of program messages.

Cexport UI_MESSAGES="pt"

`UI_MESSAGES` is not a standard environment variable used for setting the language of program messages.

Dexport LC_MESSAGES="pt"Correct

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.

Eexport ALL_MESSAGES="pt"

`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

#Localization#Environment Variables#Locale#bash_profile

Community Discussion

No community discussion yet for this question.

Full LFCS Practice