src/Translation/LanguageBucket.php
/**
	 * Translates the provided text automatically by looking for matching definitions within it. Returns the final
	 * text with variables replaced.
	 *
	 * Warning - This is a very expensive operation and should not be performed repeatedly with large definition sets.
	 * To perform auto translation, all compiled definitions are compared per call.
	 *
	 * If an array of $namespaces are provided, only those namespaces will be used for translation.
	 */
Translates the provided text automatically by looking for matching definitions within it. Returns the final
text with variables replaced.

This is a very expensive operation and should not be performed repeatedly with large definition sets.
To perform auto translation, all compiled definitions are compared per call.

If an array of $namespaces are provided, only those namespaces will be used for translation.
Translates the provided text automatically by looking for matching definitions within it . Returns the final text with variables replaced . This is a very expensive operation and should not be performed repeatedly with large definition sets . To perform auto translation all compiled definitions are compared per call . If an array of $namespaces are provided only those namespaces will be used for translation .
public function autoTranslate($text, $variables = array(), $namespaces = array()) {
		list($keys, $values) = $this->getFlattenedVariables($variables);
		$compiled = $this->getCompiledDefinitions($namespaces, $keys, $values);
		$text = preg_replace(array_keys($compiled), array_values($compiled), $text);
		return $text;
	}
public function autoTranslate ( $ text , $ variables = array ( ) , $ namespaces = array ( ) ) { list ( $ keys , $ values ) = $ this -> getFlattenedVariables ( $ variables ) ; $ compiled = $ this -> getCompiledDefinitions ( $ namespaces , $ keys , $ values ) ; $ text = preg_replace ( array_keys ( $ compiled ) , array_values ( $ compiled ) , $ text ) ; return $ text ; }
Translates the provided text automatically by looking for matching definitions within it.
Translates the provided text automatically by looking for matching definitions within it .
// Get all compiled definitions // Replace