nerdexam
CompTIA

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

Shells, Scripting and Data Management

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

(46 responses)
  • B
    2% (1)
  • C
    2% (1)
  • D
    87% (40)
  • E
    9% (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'.

Aexport LANGUAGE="pt"

While `LANGUAGE` can influence message language, `LC_MESSAGES` is the specific variable directly controlling message localization for applications.

Bexport MESSAGE="pt"

`MESSAGE` is not a standard environment variable for locale settings to control message language.

Cexport UI_MESSAGES="pt"

`UI_MESSAGES` is not a standard environment variable for locale settings to control message language.

Dexport LC_MESSAGES="pt"Correct

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.

Eexport ALL_MESSAGES="pt"

`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

#locale environment variables#LC_MESSAGES#bash_profile

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice