phpCAS version 1.3.6

Namespaces | Functions | Variables
Internationalization
Implementation » Configuration

## Namespaces
| PhpCAS

## Functions
| CAS_Client::setLang ($lang)
| CAS_Client::getLangObj ()

## Variables
| CAS_Client::$_lang = PHPCAS_LANG_DEFAULT
const | PHPCAS_LANG_DEFAULT PHPCAS_LANG_ENGLISH

## Detailed Description

To add a new language:

- 1. define a new constant PHPCAS_LANG_XXXXXX in CAS/CAS.php
- 2. copy any file from CAS/languages to CAS/languages/XXXXXX.php
- 3. Make the translations

## 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.

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

## ◆ setLang()

CAS_Client::setLang | ( |  | $lang | ) |

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

Parameters

  string | $lang | representing the language.

Returns
  void

Definition at line 201 of file Client.php.

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

## 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.