src/FileTranslator.php
public function getTranslationsForKey($key) {
		$this->getAllTranslationByLanguage();
		$translations = [];
		foreach ($this->messages as $language => $messages) {
			foreach ($messages as $messageKey => $message) {
				if($key == $messageKey) {
					$translations[$language] = $message;
				}
			}
		}
		return $translations;
	}
public function getTranslationsForKey($key) {
		$this->getAllTranslationByLanguage();
		$translations = [];
		foreach ($this->messages as $language => $messages) {
			foreach ($messages as $messageKey => $message) {
				if($key == $messageKey) {
					$translations[$language] = $message;
				}
			}
		}
		return $translations;
	}
public function getTranslationsForKey ( $ key ) { $ this -> getAllTranslationByLanguage ( ) ; $ translations = [ ] ; foreach ( $ this -> messages as $ language => $ messages ) { foreach ( $ messages as $ messageKey => $ message ) { if ( $ key == $ messageKey ) { $ translations [ $ language ] = $ message ; } } } return $ translations ; }
Return a list of all message for a key, by language.

@param string $key Key of translation
@return array<string, string> List with key value of translation
Return a list of all message for a key by language .