public function getClientPreferredLocale()
    {
        if (null !== $this->locale) {
            $locale = $this->locale;

        } else {
            // Get detector
            $detector = $this->getDetector();

            // Detect user's preferred locale
            $detector->detect();

            // get the locale from detector
            $locale = $detector->getLocale();
        }

        // return the active locale
        return $locale;
    }
public function getClientPreferredLocale()
    {
        if (null !== $this->locale) {
            $locale = $this->locale;

        } else {
            // Get detector
            $detector = $this->getDetector();

            // Detect user's preferred locale
            $detector->detect();

            // get the locale from detector
            $locale = $detector->getLocale();
        }

        // return the active locale
        return $locale;
    }
public function getClientPreferredLocale ( ) { if ( null !== $ this -> locale ) { $ locale = $ this -> locale ; } else { // Get detector $ detector = $ this -> getDetector ( ) ; // Detect user's preferred locale $ detector -> detect ( ) ; // get the locale from detector $ locale = $ detector -> getLocale ( ) ; } // return the active locale return $ locale ; }
This method is intend to return the current active locale.

@author Benjamin Carl <opensource@clickalicious.de>

@return string The active locale
This method is intend to return the current active locale .