95. Language

This module does all language related stuff:

95.1. Summary of Module Globals

List of Global Functions

  • CJKLanguage - Check if the language is "CJK" (and thus could not be shown in text mode - see bug #102958)

  • GetExpertValues - GetExpertValues()

  • GetLanguageCountry -

  • GetLocaleString - generate the whole locale string for given language according to DB (e.g. de_DE -> de_DE.UTF-8)

  • GetLocales - return the map of all supported countries and language codes

  • GetName - return user readable description of language

  • GetTextMode - return the value of text_mode (true for ncurses)

  • IncompleteTranslation - Returns true if translation for given language is not complete

  • Language - Constructor

  • MakeProposal - Return proposal string.

  • MakeSimpleProposal - Return 'simple' proposal string.

  • Modified - was anything modified?

  • PackagesCommit - Install and uninstall packages selected by Pkg::SetAdditionalLocales

  • PackagesInit - Initializes source and target, computes the packages necessary to install and uninstall, checks for disk space (#50745)

  • Read - Just store inital values - read was done in constructor

  • Save - Save state to target.

  • Selection - Return a map of ids and names to build up a selection list for the user. The key is used later in the Set function to select this language. The name is a translated string.

  • Set - Set module to selected language.

  • SetDefault - Store current language as default language.

  • SetExpertValues - SetExpertValues()

  • WfmSetGivenLanguage - WfmSetLanguag()

  • WfmSetLanguage - WfmSetLanguag()

List of Global Variables

95.2. Global Functions

95.2.1. CJKLanguage

Check if the language is "CJK" (and thus could not be shown in text mode - see bug #102958)

Function parameters

  • string lang

Return value

  • boolean

95.2.2. GetExpertValues

GetExpertValues()

Return value

  • map - with values filled in

95.2.3. GetLanguageCountry

Return value

  • string - country part of language

95.2.4. GetLocaleString

generate the whole locale string for given language according to DB (e.g. de_DE -> de_DE.UTF-8)

Function parameters

  • string lang

Return value

  • string

95.2.5. GetLocales

return the map of all supported countries and language codes

Return value

  • map<string,integer>

95.2.6. GetName

return user readable description of language

Return value

  • string

95.2.7. GetTextMode

return the value of text_mode (true for ncurses)

Return value

  • boolean

95.2.8. IncompleteTranslation

Returns true if translation for given language is not complete

Function parameters

  • string lang

Return value

  • boolean

95.2.9. Language

Constructor

Return value

  • void

95.2.10. MakeProposal

Return proposal string.

Function parameters

  • boolean force_reset

  • boolean language_changed

Return value

  • list<string> - user readable description. If force_reset is true reset the module to the language stored in default_language.

95.2.11. MakeSimpleProposal

Return 'simple' proposal string.

Return value

  • string - preformated description.

95.2.12. Modified

was anything modified?

Return value

  • boolean

95.2.13. PackagesCommit

Install and uninstall packages selected by Pkg::SetAdditionalLocales

Return value

  • boolean

95.2.14. PackagesInit

Initializes source and target, computes the packages necessary to install and uninstall, checks for disk space (#50745)

Function parameters

  • list<string> selected_languages

Return value

  • boolean - false when there is not enough disk space for new packages

95.2.15. Read

Just store inital values - read was done in constructor

Return value

  • boolean

95.2.16. Save

Save state to target.

Return value

  • void

95.2.17. Selection

Return a map of ids and names to build up a selection list for the user. The key is used later in the Set function to select this language. The name is a translated string.

Return value

  • map<string, list> - of $[ language : [ utf8-name, ascii-name] ...] for all known languages 'language' is the (2 or 5 char) ISO language code. 'utf8-name' is a user-readable (UTF-8 encoded !) string. 'ascii-name' is an english (ascii encoded !) string.

95.2.18. Set

Set module to selected language.

Function parameters

  • string lang

Return value

  • void

95.2.19. SetDefault

Store current language as default language.

Return value

  • void

95.2.20. SetExpertValues

SetExpertValues()

Function parameters

  • map val

Return value

  • void -

95.2.21. WfmSetGivenLanguage

WfmSetLanguag()

Function parameters

  • string lang

Return value

  • void - -

95.2.22. WfmSetLanguage

WfmSetLanguag()

Return value

  • void - -

95.3. Global Variables

95.3.1. language

currently selected language

95.3.2. language_on_entry

original language

95.3.3. languages

Default settings for INSTALLED_LANGUAGES in /etc/sysconfig/language

95.3.4. preselected

language preselected in /etc/install.inf

95.4. Module Requirements

95.4.1. Module Imports

  • AsciiFile
  • Encoding
  • HTML
  • Linuxrc
  • Misc
  • Mode
  • PackageCallbacksInit
  • PackageSystem
  • ProductFeatures
  • Stage

95.4.2. Module Includes