Language |
modules/Language.ycp |
This module does all language related stuff: | |
|
Imports
Global VariablesGlobal Functions
Local VariablesLocal Functions |
currently selected language
original language
language preselected in /etc/install.inf
user readable description of language
Default language to be restored with MakeProposal.
Default settings for ROOT_USES_LANG in /etc/sysconfig/language
Default settings for INSTALLED_LANGUAGES in /etc/sysconfig/language
Original value of INSTALLED_LANGUAGES
Use utf8 in locale
ncurses mode
level of translation completeness
Check if the language is "CJK" (and thus could not be shown in text mode - see bug #102958)
- Parameters:
-
lang
return the value of text_mode (true for ncurses)
Read language DB: translatable strings will be translated to current language
return the map of all supported countries and language codes
Set module to selected language.
- Parameters:
-
lang language string ISO code of language
generate the whole locale string for given language according to DB (e.g. de_DE -> de_DE.UTF-8)
- Parameters:
-
lang
Store current language as default language.
Get the map for conversion of old lang codes to new ISO-codes (since Rel. 8.0) FIXME obsolete
- Return value:
-
conversion map
Constructor
Just store inital values - read was done in constructor
was anything modified?
GetExpertValues()
Return the values for the various expert settings in a map
- Return value:
-
with values filled in
SetExpertValues()
Set the values of the various expert setting
- Parameters:
-
val map with new values of expert settings
- Return value:
-
WfmSetLanguag()
Set the given language in WFM and UI
- Parameters:
-
lang
- Return value:
-
-
WfmSetLanguag()
Set the current language in WFM and UI
- Return value:
-
-
Return proposal string.
- Parameters:
-
force_reset language_changed
- Return value:
-
user readable description. If force_reset is true reset the module to the language stored in default_language.
Return 'simple' proposal string.
- Return value:
-
preformated description.
return user readable description of language
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:
-
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.
- See
-
Set
Save state to target.
Initializes source and target, computes the packages necessary to install and uninstall, checks for disk space (#50745)
- Parameters:
-
selected_languages
- Return value:
-
false when there is not enough disk space for new packages
Install and uninstall packages selected by Pkg::SetAdditionalLocales
- Return value:
-
country part of language
Returns true if translation for given language is not complete
- Parameters:
-
lang