Core/getLanguage

From PunchCMS
Revision as of 22:30, 25 December 2008 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

PCMS_Client->getLanguage()

Overview

Get the currently active language.

Arguments

None

Returns

A valid Languages object if an active language can be found. Otherwise NULL. That way you can test if you get a valid return using the is_object() method.

Example

$objCms = PCMS_Client::getInstance();
 
$objLanguage = $objCms->getLanguage();
if (is_object($objLanguage)) {
    // Active language found.
}