nerdexam
Linux_Foundation

LFCS · Question #236

Which of the following commands should be added to /etc/bash_profile to change the language of messages from an internationalised program to Portuguese (pt)? (Select TWO).

The correct answer is C. export LANG="pt" D. export LC_MESSAGES="pt". The language for messages from internationalized programs is primarily controlled by the LANG and LC_MESSAGES environment variables.

Submitted by carter_n· Apr 18, 2026Essential Commands

Question

Which of the following commands should be added to /etc/bash_profile to change the language of messages from an internationalised program to Portuguese (pt)? (Select TWO).

Options

  • Aexport LANGUAGE="pt"
  • Bexport MESSAGE="pt"
  • Cexport LANG="pt"
  • Dexport LC_MESSAGES="pt"
  • Eexport ALL_MESSAGES="pt"

How the community answered

(20 responses)
  • B
    5% (1)
  • C
    90% (18)
  • E
    5% (1)

Why each option

The language for messages from internationalized programs is primarily controlled by the `LANG` and `LC_MESSAGES` environment variables.

Aexport LANGUAGE="pt"

`LANGUAGE` is a GNU extension that specifies a priority list of languages for message translation, but `LANG` and `LC_MESSAGES` are the more fundamental POSIX variables for setting the current locale and message language directly.

Bexport MESSAGE="pt"

`MESSAGE` is not a standard environment variable used for controlling language settings in internationalized programs.

Cexport LANG="pt"Correct

The `LANG` environment variable sets the overall locale, which includes the default language for all `LC_*` categories if they are not explicitly set, instructing internationalized programs to use Portuguese for messages.

Dexport LC_MESSAGES="pt"Correct

The `LC_MESSAGES` environment variable specifically controls the language used for program messages, such as prompts, error messages, and status output, ensuring these are displayed in Portuguese.

Eexport ALL_MESSAGES="pt"

`ALL_MESSAGES` is not a standard environment variable used for controlling language settings in internationalized programs.

Concept tested: Linux locale and language configuration

Source: https://man7.org/linux/man-pages/man7/locale.7.html

Topics

#Locale#Environment Variables#Shell Configuration#Internationalization

Community Discussion

No community discussion yet for this question.

Full LFCS Practice