public function addLocale($locale)
    {
        // Get sanitized locale
        $locale = Locale::sanitizeLocale($locale);

        if (!isset($this->available[$locale])) {
            $locale = new Locale($locale);

            $this->available[$locale->getLocale()] = $locale;
        }

        return $this;
    }
public function addLocale($locale)
    {
        // Get sanitized locale
        $locale = Locale::sanitizeLocale($locale);

        if (!isset($this->available[$locale])) {
            $locale = new Locale($locale);

            $this->available[$locale->getLocale()] = $locale;
        }

        return $this;
    }
public function addLocale ( $ locale ) { // Get sanitized locale $ locale = Locale :: sanitizeLocale ( $ locale ) ; if ( ! isset ( $ this -> available [ $ locale ] ) ) { $ locale = new Locale ( $ locale ) ; $ this -> available [ $ locale -> getLocale ( ) ] = $ locale ; } return $ this ; }
Add locale to available locales.

@param string|Locale $locale

@return $this
Add locale to available locales .