ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Internationalization

To add a new language: More...

+ Collaboration diagram for Internationalization:

Namespaces

 PhpCAS
 

Functions

 CAS_Client::setLang ($lang)
 This method is used to set the language used by phpCAS. More...
 
 CAS_Client::getLangObj ()
 Create the language. More...
 

Variables

 CAS_Client::$_lang = PHPCAS_LANG_DEFAULT
 A string corresponding to the language used by phpCAS. More...
 
const PHPCAS_LANG_DEFAULT PHPCAS_LANG_ENGLISH
 phpCAS default language (when phpCAS::setLang() is not used) More...
 

Detailed Description

To add a new language:

Function Documentation

◆ getLangObj()

CAS_Client::getLangObj ( )

Create the language.

Returns
CAS_Languages_LanguageInterface object implementing the class

Definition at line 226 of file Client.php.

References CAS_Client\$_lang.

Referenced by CAS_Client\_authError(), CAS_Client\logout(), CAS_Client\printHTMLFooter(), CAS_Client\redirectToCas(), CAS_Client\serviceMail(), and CAS_Client\serviceWeb().

227  {
228  $classname = $this->_lang;
229  return new $classname();
230  }
$_lang
A string corresponding to the language used by phpCAS.
Definition: Client.php:195
+ Here is the caller graph for this function:

◆ setLang()

CAS_Client::setLang (   $lang)

This method is used to set the language used by phpCAS.

Parameters
string$langrepresenting the language.
Returns
void

Definition at line 204 of file Client.php.

References $lang, phpCAS\traceBegin(), and phpCAS\traceEnd().

205  {
206  // Argument Validation
207  if (gettype($lang) != 'string') {
208  throw new CAS_TypeMismatchException($lang, '$lang', 'string');
209  }
210 
212  $obj = new $lang();
213  if (!($obj instanceof CAS_Languages_LanguageInterface)) {
215  '$className must implement the CAS_Languages_LanguageInterface'
216  );
217  }
218  $this->_lang = $lang;
220  }
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:658
Exception that denotes invalid arguments were passed.
Language Interface class for all internationalization files.
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:611
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
Definition: langwiz.php:349
+ Here is the call graph for this function:

Variable Documentation

◆ $_lang

CAS_Client::$_lang = PHPCAS_LANG_DEFAULT
private

A string corresponding to the language used by phpCAS.

Written by CAS_Client::setLang(), read by CAS_Client::getLang().

Note
debugging information is always in english (debug purposes only).

Definition at line 195 of file Client.php.

Referenced by CAS_Client\getLangObj().

◆ PHPCAS_LANG_DEFAULT

const PHPCAS_LANG_DEFAULT PHPCAS_LANG_ENGLISH

phpCAS default language (when phpCAS::setLang() is not used)

Definition at line 234 of file CAS.php.