19 if (
$doc->isAlive()) {
20 $all_lang_keys =
$doc->_val2array(
$doc->getParamValue(
'help_p_lang_key'));
21 $all_lang_texts =
$doc->_val2array(
$doc->getParamValue(
'help_p_lang_name'));
23 foreach ($all_lang_keys as $i => $key) {
24 $langs[] = $key .
'|' . $all_lang_texts[$i];
26 return implode(
',', $langs);
28 return 'fr_FR|' . _(
'french');
34 include_once (
'FDL/editutil.php');
38 $action->lay->set(
'DOCID',
$docid);
39 $action->lay->set(
'DOCTITLE',
$doc->getTitle());
41 $helps =
$doc->getHelpByLang();
42 $langs =
$doc->getFamilyLangs();
44 $action->lay->set(
'JSONLANGS', json_encode($langs));
47 $action->lay->set(
'SECTIONKEY', $section_key);
50 foreach ($langs as $lang_key => $lang_name) {
52 'LANGKEY' => $lang_key,
53 'LANGISO' => strtolower(substr($lang_key, -2)) ,
54 'LANGNAME' => $lang_name,
58 $action->lay->SetBlockData(
'LEGENDCSSLANGS', $langitems);
59 $action->lay->SetBlockData(
'LEGENDLANGS', $langitems);
60 $action->lay->SetBlockData(
'MENULANGS', $langitems);
66 include_once (
'FDL/editutil.php');
70 $action->lay->set(
'DOCID',
$docid);
71 $action->lay->set(
'DOCTITLE',
$doc->getTitle());
73 $helps =
$doc->getHelpByLang();
74 $langs =
$doc->getFamilyLangs();
76 $action->lay->set(
'JSONLANGS', json_encode($langs));
81 foreach ($langs as $lang_key => $lang_name) {
83 $item[
'LANGKEY'] = $lang_key;
84 $item[
'LANGISO'] = strtolower(substr($lang_key, -2));
85 $item[
'LANGNAME'] = $lang_name;
86 $item[
'LANGDISPLAY'] =
'none';
87 $oa1 =
$doc->getAttribute(
'help_name');
88 $oa2 =
$doc->getAttribute(
'help_description');
89 if (array_key_exists($lang_key, $helps)) {
91 $item[
'LANGDISPLAY'] =
'block';
94 $item[
'INPUTLANGNAME'] =
getHtmlInput(
$doc, $oa1, $helps[$lang_key][
'help_name'], $index,
'',
true);
95 $item[
'INPUTLANGDESCRIPTION'] =
getHtmlInput(
$doc, $oa2, $helps[$lang_key][
'help_description'], $index,
'',
true);
98 $item[
'INPUTLANGDESCRIPTION'] =
getHtmlInput(
$doc, $oa2,
'', $index,
'',
true);
101 $helplangs[] = $item;
103 if (!empty($helplangs) && !$displayed) {
104 $helplangs[0][
'LANGDISPLAY'] =
'block';
106 $action->lay->SetBlockData(
'HELPLANGS1', $helplangs);
107 $action->lay->SetBlockData(
'HELPLANGS2', $helplangs);