protected function initLocale($locale)
    {
        $file = $this->localeDir . '/' . $locale . '.php';
        if (file_exists($file)) {
            $data = include $file;

            if (!is_array($data)) {
                $data = [];
            }
        } else {
            $data = [];
        }

        if (!isset($data['pluralForm']) || !is_callable($data['pluralForm'])) {
            $data['pluralForm'] = null;
        }
        if (!isset($data['texts'])) {
            $data['texts'] = [];
        }

        $this->data[$locale] = $data;
    }
protected function initLocale($locale)
    {
        $file = $this->localeDir . '/' . $locale . '.php';
        if (file_exists($file)) {
            $data = include $file;

            if (!is_array($data)) {
                $data = [];
            }
        } else {
            $data = [];
        }

        if (!isset($data['pluralForm']) || !is_callable($data['pluralForm'])) {
            $data['pluralForm'] = null;
        }
        if (!isset($data['texts'])) {
            $data['texts'] = [];
        }

        $this->data[$locale] = $data;
    }
protected function initLocale ( $ locale ) { $ file = $ this -> localeDir . '/' . $ locale . '.php' ; if ( file_exists ( $ file ) ) { $ data = include $ file ; if ( ! is_array ( $ data ) ) { $ data = [ ] ; } } else { $ data = [ ] ; } if ( ! isset ( $ data [ 'pluralForm' ] ) || ! is_callable ( $ data [ 'pluralForm' ] ) ) { $ data [ 'pluralForm' ] = null ; } if ( ! isset ( $ data [ 'texts' ] ) ) { $ data [ 'texts' ] = [ ] ; } $ this -> data [ $ locale ] = $ data ; }
Set translations and plural form for the given locale.

@param string $locale
Set translations and plural form for the given locale .