diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 9f180343f5b..e69a4a5dbb2 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -182,7 +182,7 @@ class MyObject extends CommonObject */ public function __construct(DoliDB $db) { - global $conf, $user; + global $conf, $langs, $user; $this->db = $db; @@ -197,6 +197,9 @@ class MyObject extends CommonObject unset($this->fields[$key]); } } + + // Translate some data + $this->fields['status']['arrayofkeyval']=array(0=>$langs->trans('Draft'), 1=>$langs->trans('Active'), -1=>$langs->trans('Cancel')); } /**