Forums

multilingual form

alfredopacino 31 Jan, 2014
hi i tried to user joomla vars in chronoform label, it doesn't work, what is the exact method for a multilingual form?
GreyHead 01 Feb, 2014
Hi alfredopacino,

In CFv4 you can use the Multi Language action (one copy for each language) at the beginning of the event where you need to translate text.

I recommend that if you use this you use distinctive text strings in your form where you want the text to be translated - that way it is very clear if a translation is missing.

Then add the source string and the translation in each of the Multi-Language actions. Here's an example
##status##=Form Complete?
##tick_tooltip##=Tick ONLY when the form is complete - you will not be able to edit the form after this
##Submit##=Submit Formative Assessment Report
##School area##=School Area
##School##=School
##Choose_school##=Select Partnership School
##status##=Ffurflen wedi ei chwblhau?
##tick_tooltip##=Ticiwch yn unig pan mae'r ffurflen wedi'i chwblhau - Nid oes modd i chi olygu'r ffurflen ar ôl hyn.
##Submit##=Cyflwynwch eich Adroddiad Asesu Ffurfiannol
##School area##-Ardal Ysgol
##School##=Ysgol
##Choose_school##=Dewiswch faes Ysgol

Bob
alfredopacino 01 Feb, 2014
i placed 2 multilanguage action above show html action
one with the line
##name##=NAME Italian
and the other one
##name##=NAME english

it's doesn't work
what should be ##name##? the field name, label or id?
alfredopacino 01 Feb, 2014
ok now works, i removed the #, i don't know why you use # in your examples😀
GreyHead 01 Feb, 2014
Hi alfredopacino,

Sorry I was in a hurry. I use labels like ##name## and put that in the input of the element. That way I know that if I see ##name## when I view the form that I still need to add the translation.

There's also a problem that the translation is done using very simple search and replace so if you use 'name' for one element and then use 'username' later on the translation of 'username' will break because the string will already have been changed to 'usernom' (or whatever your translation is). If you use ##name## and ##username## you avoid this problem.

Bob
alfredopacino 01 Feb, 2014
ok got it🙂
there is still a strange problem:
each submit i get 2 new article: one totally empty (just the author is correct) and one filled with correct data
what could be the cause?
GreyHead 03 Feb, 2014
Hi alfredopacino,

Sorry, no idea from the information here. Please drag a Debugger action into the On Submit event, then submit the form and post the debug info here.

Bob
This topic is locked and no more replies can be posted.