Cake\ORM\Behavior\TranslateBehavior::locale PHP Метод

locale() публичный Метод

Sets all future finds for the bound table to also fetch translated fields for the passed locale. If no value is passed, it returns the currently configured locale
public locale ( string | null $locale = null ) : string
$locale string | null The locale to use for fetching translated records
Результат string
    public function locale($locale = null)
    {
        if ($locale === null) {
            return $this->_locale ?: I18n::locale();
        }
        return $this->_locale = (string) $locale;
    }