framework/i18n/GettextMessageSource.php
protected function loadMessagesFromFile($messageFile, $category)
    {
        if (is_file($messageFile)) {
            if ($this->useMoFile) {
                $gettextFile = new GettextMoFile(['useBigEndian' => $this->useBigEndian]);
            } else {
                $gettextFile = new GettextPoFile();
            }
            $messages = $gettextFile->load($messageFile, $category);
            if (!is_array($messages)) {
                $messages = [];
            }

            return $messages;
        }

        return null;
    }
protected function loadMessagesFromFile($messageFile, $category)
    {
        if (is_file($messageFile)) {
            if ($this->useMoFile) {
                $gettextFile = new GettextMoFile(['useBigEndian' => $this->useBigEndian]);
            } else {
                $gettextFile = new GettextPoFile();
            }
            $messages = $gettextFile->load($messageFile, $category);
            if (!is_array($messages)) {
                $messages = [];
            }

            return $messages;
        }

        return null;
    }
protected function loadMessagesFromFile ( $ messageFile , $ category ) { if ( is_file ( $ messageFile ) ) { if ( $ this -> useMoFile ) { $ gettextFile = new GettextMoFile ( [ 'useBigEndian' => $ this -> useBigEndian ] ) ; } else { $ gettextFile = new GettextPoFile ( ) ; } $ messages = $ gettextFile -> load ( $ messageFile , $ category ) ; if ( ! is_array ( $ messages ) ) { $ messages = [ ] ; } return $ messages ; } return null ; }
Loads the message translation for the specified language and category or returns null if file doesn't exist.

@param string $messageFile path to message file
@param string $category the message category
@return array|null array of messages or null if file not found
Loads the message translation for the specified language and category or returns null if file doesn t exist .