src/Panda/Localization/Processors/AbstractProcessor.php
public function get($key, $locale, $package = 'default', $default = null)
    {
        // Check key
        if (empty($key)) {
            return $default;
        }

        // Normalize group and load translations
        $package = ($package ?: 'default');

        try {
            $this->loadTranslations($locale, $package);

            // Return translation
            $array = (static::$translations[$locale] ?: []);

            $value = ArrayHelper::get($array, $key, $default, true);
        } catch (Exception $ex) {
            $value = $default;
        }

        return $value;
    }
public function get($key, $locale, $package = 'default', $default = null)
    {
        // Check key
        if (empty($key)) {
            return $default;
        }

        // Normalize group and load translations
        $package = ($package ?: 'default');

        try {
            $this->loadTranslations($locale, $package);

            // Return translation
            $array = (static::$translations[$locale] ?: []);

            $value = ArrayHelper::get($array, $key, $default, true);
        } catch (Exception $ex) {
            $value = $default;
        }

        return $value;
    }
public function get ( $ key , $ locale , $ package = 'default' , $ default = null ) { // Check key if ( empty ( $ key ) ) { return $ default ; } // Normalize group and load translations $ package = ( $ package ? : 'default' ) ; try { $ this -> loadTranslations ( $ locale , $ package ) ; // Return translation $ array = ( static :: $ translations [ $ locale ] ? : [ ] ) ; $ value = ArrayHelper :: get ( $ array , $ key , $ default , true ) ; } catch ( Exception $ ex ) { $ value = $ default ; } return $ value ; }
Get a translation value.
If the default value is null and no translation is found, it throws Exception.

@param string $key
@param string $locale
@param string $package
@param mixed  $default

@return mixed
Get a translation value . If the default value is null and no translation is found it throws Exception .