private function loadModuleTranslation(AbstractModule $module, $language)
    {
        // Translations are optional
        if (method_exists($module, 'getTranslations')) {
            $translations = $module->getTranslations($language);

            // Only array must be provided, otherwise ignore another type
            if (is_array($translations)) {
                // If that's an array, then append translations
                foreach ($translations as $string => $translation) {
                    $this->translations[$string] = $translation;
                }

                // And indicate success
                return true;
            }
        }

        // Failure by default
        return false;
    }
private function loadModuleTranslation(AbstractModule $module, $language)
    {
        // Translations are optional
        if (method_exists($module, 'getTranslations')) {
            $translations = $module->getTranslations($language);

            // Only array must be provided, otherwise ignore another type
            if (is_array($translations)) {
                // If that's an array, then append translations
                foreach ($translations as $string => $translation) {
                    $this->translations[$string] = $translation;
                }

                // And indicate success
                return true;
            }
        }

        // Failure by default
        return false;
    }
private function loadModuleTranslation ( AbstractModule $ module , $ language ) { // Translations are optional if ( method_exists ( $ module , 'getTranslations' ) ) { $ translations = $ module -> getTranslations ( $ language ) ; // Only array must be provided, otherwise ignore another type if ( is_array ( $ translations ) ) { // If that's an array, then append translations foreach ( $ translations as $ string => $ translation ) { $ this -> translations [ $ string ] = $ translation ; } // And indicate success return true ; } } // Failure by default return false ; }
Loads translation message for particular module

@param \Krystal\Application\Module\AbstractModule $module Module instance
@param string $language Language name to be loaded
@return boolean
Loads translation message for particular module