L10n Class Reference

Inheritance diagram for L10n:

Object List of all members.

Public Member Functions

 __autoLanguage ()
 __construct ()
 __setLanguage ($language=null)
 catalog ($language=null)
 get ($language=null)
 map ($mixed=null)

Public Attributes

 $__l10nCatalog
 $__l10nMap
 $charset = 'utf-8'
 $default = null
 $found = false
 $lang = 'eng'
 $language = 'English (United States)'
 $languagePath = array('eng')
 $locale = 'en_us'

Detailed Description

Definition at line 35 of file l10n.php.


Constructor & Destructor Documentation

L10n::__construct (  ) 

Class constructor

Reimplemented from Object.

Definition at line 320 of file l10n.php.

References __construct().


Member Function Documentation

L10n::__autoLanguage (  ) 

Attempts to find the locale settings based on the HTTP_ACCEPT_LANGUAGE variable

Returns:
boolean Success private

Definition at line 395 of file l10n.php.

References __setLanguage(), and env().

Referenced by get().

L10n::__setLanguage ( language = null  ) 

Sets the class vars to correct values for $language. If $language is null it will use the DEFAULT_LANGUAGE if defined

Parameters:
string $language Language (if null will use DEFAULT_LANGUAGE if defined) private

Definition at line 348 of file l10n.php.

References $language, Configure::read(), and Configure::write().

Referenced by __autoLanguage(), and get().

L10n::catalog ( language = null  ) 

Attempts to find catalog record for requested language

Parameters:
mixed $language string requested language, array of requested languages, or null for whole catalog
Returns:
mixed array catalog record for requested language, array of catalog records, whole catalog, or false when language doesn't exist

Definition at line 448 of file l10n.php.

References $language.

L10n::get ( language = null  ) 

Gets the settings for $language. If $language is null it attempt to get settings from I10n::__autoLanguage(); if this fails the method will get the settings from I10n::__setLanguage();

Parameters:
string $language Language (if null will use DEFAULT_LANGUAGE if defined) public

Definition at line 334 of file l10n.php.

References $language, __autoLanguage(), and __setLanguage().

L10n::map ( mixed = null  ) 

Attempts to find locale for language, or language for locale

Parameters:
mixed $mixed 2/3 char string (language/locale), array of those strings, or null
Returns:
mixed string language/locale, array of those values, whole map as an array, or false when language/locale doesn't exist public

Definition at line 423 of file l10n.php.


Member Data Documentation

L10n::$__l10nCatalog

Definition at line 178 of file l10n.php.

L10n::$__l10nMap

Definition at line 93 of file l10n.php.

L10n::$charset = 'utf-8'

Definition at line 79 of file l10n.php.

L10n::$default = null

Definition at line 72 of file l10n.php.

L10n::$found = false

Definition at line 86 of file l10n.php.

L10n::$lang = 'eng'

Definition at line 56 of file l10n.php.

L10n::$language = 'English (United States)'

Definition at line 42 of file l10n.php.

Referenced by __setLanguage(), catalog(), and get().

L10n::$languagePath = array('eng')

Definition at line 49 of file l10n.php.

L10n::$locale = 'en_us'

Definition at line 63 of file l10n.php.


The documentation for this class was generated from the following file:
Generated on Sun Nov 22 00:30:56 2009 for CakePHP 1.2.x.x (v1.2.4.8284) by doxygen 1.4.7