I'm trying to create multilingual questionnaire based on SharePoint list. Our first idea was to use column display names for english text and column description for other language. But SharePoint displays column description not under column name, but under input field.
Is it possible to change rendering layout of new/edit/view forms and put description just under the column name?
At the moment we trying another approach - name all the questions like Q1..Qn and use javascript to put actual text to the forms.
<script type='text/javascript' language='javascript'>
function Translate()
{
var TranslateEn={};
TranslateEn['Q1']='English text for Question 1?';
TranslateEn['Q2']='English text for Question 2?';
TranslateEn['Q3']='English text for Question 3?';
var labels=document.querySelectorAll("td.ms-formlabel > h3");
for (i = 0; i < labels.length; ++i) {
var txt = labels[i].children[0].innerText;
if (txt in TranslateEn)
{
labels[i].appendChild(document.createElement('div')).innerHTML = "<nobr>" + TranslateEn[txt] + "</nobr>";
}
}
}
_spBodyOnLoadFunctionNames.push("insertLineBreaks");
</script>
It works, but with a delay so users can see how texts are replaced, and it has a problem if we use popup dialogs for new/edit form - size of form is not recalculated to the new text length.
Could someone recommend more correct solution?