ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Internationalization

To add a new language: More...

+ Collaboration diagram for Internationalization:

Namespaces

namespace  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

const PHPCAS_LANG_DEFAULT PHPCAS_LANG_ENGLISH
 phpCAS default language (when phpCAS::setLang() is not used) More...
 
 CAS_Client::$_lang = PHPCAS_LANG_DEFAULT
 A string corresponding to the language used by phpCAS. 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 222 of file Client.php.

223 {
224 $classname = $this->_lang;
225 return new $classname();
226 }
$_lang
A string corresponding to the language used by phpCAS.
Definition: Client.php:192

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().

+ 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 201 of file Client.php.

202 {
203 // Argument Validation
204 if (gettype($lang) != 'string')
205 throw new CAS_TypeMismatchException($lang, '$lang', 'string');
206
208 $obj = new $lang();
209 if (!($obj instanceof CAS_Languages_LanguageInterface)) {
211 '$className must implement the CAS_Languages_LanguageInterface'
212 );
213 }
214 $this->_lang = $lang;
216 }
Exception that denotes invalid arguments were passed.
$lang
Definition: consent.php:3
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode.
Definition: CAS.php:591
Language Interface class for all internationalization files.

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

+ 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 192 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.