Add solution to translate
This commit is contained in:
parent
af18e1b043
commit
cae83cd8e7
@ -182,7 +182,7 @@ class MyObject extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public function __construct(DoliDB $db)
|
public function __construct(DoliDB $db)
|
||||||
{
|
{
|
||||||
global $conf, $user;
|
global $conf, $langs, $user;
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
|
|
||||||
@ -197,6 +197,9 @@ class MyObject extends CommonObject
|
|||||||
unset($this->fields[$key]);
|
unset($this->fields[$key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Translate some data
|
||||||
|
$this->fields['status']['arrayofkeyval']=array(0=>$langs->trans('Draft'), 1=>$langs->trans('Active'), -1=>$langs->trans('Cancel'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user