Currently, in order to add Description to form element we have to use three lines:
$lang_code = new XoopsFormText(_AM_XLANG_CODE, 'lang_charset', 50, 255, $lang_code);
$lang_code->setDescription(_AM_XLANG_CODE_DESC);
$sform->addElement($lang_code, true);
instead of taking advantage of:
$sform->addElement(new XoopsFormText(_AM_XLANG_CODE, 'lang_code', 50, 255, $lang_code), true);
we should be able to expand it by adding _AM_XLANG_CODE_DESC to the constructor as follow:
$sform->addElement(new XoopsFormText(_AM_XLANG_CODE, _AM_XLANG_CODE_DESC, 'lang_code', 50, 255, $lang_code), true);