Name

UI::GetLanguage — Gets Language

Synopsis

string GetLanguage ( boolean  strip_encoding );

Parameters

boolean strip_encoding

Return

string

Description

Retrieves the current language setting from of the user interface. Since YaST2 is a client server architecture, we distinguish between the language setting of the user interface and that of the configuration modules. If the module or the translator wants to know which language the user currently uses, it can call GetLanguage. The return value is an ISO language code, such as "de" or "de_DE".

If "strip_encoding" is set to "true", all encoding or similar information is cut off, i.e. everything from the first "." or "@" on. Otherwise the current contents of the "LANG" environment variable is returned ( which very likely ends with ".UTF-8" since this is the encoding YaST2 uses internally).