Translate documentation of translate class

This commit is contained in:
Alfredo Altamirano 2019-10-20 11:44:07 -05:00
parent 05352a62e5
commit d921b08e5c

View File

@ -586,18 +586,18 @@ class Translate
/**
* Return text translated of text received as parameter (and encode it into HTML)
* Si il n'y a pas de correspondance pour ce texte, on cherche dans fichier alternatif
* et si toujours pas trouve, il est retourne tel quel
* Les parametres de cette methode peuvent contenir de balises HTML.
* If there is no match for this text, we look in alternative file and if still not found,
* it is returned as it is
* The parameters of this method can contain HTML tags
*
* @param string $key Key to translate
* @param string $param1 chaine de param1
* @param string $param2 chaine de param2
* @param string $param3 chaine de param3
* @param string $param4 chaine de param4
* @param string $param1 param1 string
* @param string $param2 param2 string
* @param string $param3 param3 string
* @param string $param4 param4 string
* @param int $maxsize Max length of text
* @return string Translated string (encoded into HTML entities and UTF8)
*/
*/
public function trans($key, $param1 = '', $param2 = '', $param3 = '', $param4 = '', $maxsize = 0)
{
global $conf;
@ -647,9 +647,9 @@ class Translate
/**
* Return translated value of a text string
* Si il n'y a pas de correspondance pour ce texte, on cherche dans fichier alternatif
* et si toujours pas trouve, il est retourne tel quel.
* Parameters of this method must not contains any HTML tags.
* If there is no match for this text, we look in alternative file and if still not found
* it is returned as is.
* Parameters of this method must not contain any HTML tags.
*
* @param string $key Key to translate
* @param string $param1 chaine de param1
@ -667,9 +667,9 @@ class Translate
/**
* Return translated value of a text string
* Si il n'y a pas de correspondance pour ce texte, on cherche dans fichier alternatif
* et si toujours pas trouve, il est retourne tel quel.
* No convert to encoding charset of lang object is done.
* If there is no match for this text, we look in alternative file and if still not found,
* it is returned as is.
* No conversion to encoding charset of lang object is done.
* Parameters of this method must not contains any HTML tags.
*
* @param string $key Key to translate
@ -781,7 +781,7 @@ class Translate
if (preg_match('/^[a-z]+_[A-Z]+/i', $dir))
{
$this->load("languages");
if (! empty($conf->global->MAIN_LANGUAGES_ALLOWED) && ! in_array($dir, explode(',', $conf->global->MAIN_LANGUAGES_ALLOWED)) ) continue;
if ($usecode == 2)