Class CMS_languagesCatalog

Description

Class CMS_languagesCatalog

Manages the langauges collection

Located in /automne/classes/common/languagescatalog.php (line 27)

CMS_grandFather
   |
   --CMS_languagesCatalog
Method Summary
 static array(CMS_language) getAllLanguages ([string $module = false], [string $orderBy = "label_lng"])
 static CMS_language getByCode (string $code)
 static CMS_language getDefaultLanguage ([boolean $guessFromNavigator = false])
 static array(id searchMessages (string $module, [string $search = ''], [array $languagesOnly = array()], [array $options = array()], [string $direction = 'asc'], [integer $start = 0], [integer $limit = 0], integer &$resultsnb)
 array(code getAllLanguagesCodes ()
Methods
static getAllLanguages (line 38)

Get all the available languages for backoffice use (no module specified) or for a module backoffice.

Static function.

  • return: The available languages sorted by label
  • access: public
static array(CMS_language) getAllLanguages ([string $module = false], [string $orderBy = "label_lng"])
  • string $module: The codename of a module we want the languages of.
  • string $orderBy: The ordering key to use (default : label_lng)
static getByCode (line 79)

Get a language by its code.

Static function.

  • return: The found language, false if not found
  • access: public
static CMS_language getByCode (string $code)
  • string $code: The language code
static getDefaultLanguage (line 98)

Get the default language.

  • return: The default language
  • access: public
static CMS_language getDefaultLanguage ([boolean $guessFromNavigator = false])
  • boolean $guessFromNavigator: guessFromNavigator : try to guess default user language from HTTP_ACCEPT_LANGUAGE (default : false)
static searchMessages (line 132)

Search messages Static function.

  • return: => msg)
  • access: public
static array(id searchMessages (string $module, [string $search = ''], [array $languagesOnly = array()], [array $options = array()], [string $direction = 'asc'], [integer $start = 0], [integer $limit = 0], integer &$resultsnb)
  • string $module: module : module to search messages
  • string $search: search : search message by value
  • array $languagesOnly: languagesOnly : limit search to given languages codes
  • array $options: options : search options
  • string $direction: direction : search is ordered by results id. Specify order direction (asc or desc). Default : asc
  • integer $start: start : search start offset
  • integer $limit: limit : search limit (default : 0 : unlimited)
  • integer &$resultsnb: resultsnb : return results count by reference
getAllLanguagesCodes (line 300)

Get all available languages codes from ISO 639-1 standard Static function.

  • return: => label)
  • access: public
array(code getAllLanguagesCodes ()

Inherited Methods

Inherited From CMS_grandFather

 CMS_grandFather::autoload()
 CMS_grandFather::hasError()
 CMS_grandFather::log()
 CMS_grandFather::PHPErrorHandler()
 CMS_grandFather::raiseError()
 CMS_grandFather::setDebug()
 CMS_grandFather::setLog()
 CMS_grandFather::_raiseError()
 CMS_grandFather::__call()
Class Constants

Documentation generated on Wed, 15 Feb 2012 15:31:37 +0100 by phpDocumentor 1.4.3