classes/Localization.php
public function addDictionary(string $locale, $callbackOrArray): \BearFramework\Localization
    {
        if (!isset($this->dictionaries[$locale])) {
            $this->dictionaries[$locale] = [];
        }
        $this->dictionaries[$locale][] = $callbackOrArray;
        return $this;
    }
public function addDictionary(string $locale, $callbackOrArray): \BearFramework\Localization
    {
        if (!isset($this->dictionaries[$locale])) {
            $this->dictionaries[$locale] = [];
        }
        $this->dictionaries[$locale][] = $callbackOrArray;
        return $this;
    }
public function addDictionary ( string $ locale , $ callbackOrArray ) : \ BearFramework \ Localization { if ( ! isset ( $ this -> dictionaries [ $ locale ] ) ) { $ this -> dictionaries [ $ locale ] = [ ] ; } $ this -> dictionaries [ $ locale ] [ ] = $ callbackOrArray ; return $ this ; }
Adds a new dictionary.
@param string $locale A locale code.
@param type $callbackOrArray An array containing dictionary data (in key=>value format) or a callback that returns such array.
@return \BearFramework\Localization Returns a instance to itself.
Adds a new dictionary .