diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 9a8ade00367..63500b156a8 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -348,6 +348,7 @@ class Form return ''; // No extralang field to show } + $result .= ''."\n"; $result .= '
'; $s = img_picto($langs->trans("ShowOtherLanguages"), 'language', '', false, 0, 0, '', 'fa-15 editfieldlang'); $result .= $s; @@ -7408,9 +7409,14 @@ class Form $htmltext = ''; // If there is extra languages foreach ($arrayoflangcode as $extralangcode) { - $s = picto_from_langcode($extralangcode, 'class="pictoforlang paddingright"'); - $htmltext .= $s.$object->array_languages['name'][$extralangcode]; + $htmltext .= picto_from_langcode($extralangcode, 'class="pictoforlang paddingright"'); + if ($object->array_languages['name'][$extralangcode]) { + $htmltext .= $object->array_languages['name'][$extralangcode]; + } else { + $htmltext .= ''.$langs->trans("SwitchInEditModeToAddTranslation").''; + } } + $ret .= ''."\n"; $ret .= $this->textwithpicto('', $htmltext, -1, 'language', 'opacitymedium paddingleft'); } } diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 2082506c405..c34ea6a9e96 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1028,3 +1028,5 @@ YAxis=Y-Axis StatusOfRefMustBe=Status of %s must be %s DeleteFileHeader=Confirm file delete DeleteFileText=Do you really want delete this file? +ShowOtherLanguages=Show other languages +SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for this language