Forums

multilanguage form

glambrecht 01 Apr, 2012
I would like to create a multilanguage form. you have a description under Turorials - but it doesn't help me much.
the very first sentence you have - is:
I will got the forms manager > check my form and click "edit" then to the Plugins tab > enable the Multi language plugin and hit save

First of all - I do not have all those tabs - you show
Secondly - WHERE do I click "check my form"
Thirdly - I don't have any Plugins tab
....
br
Grethe
GreyHead 01 Apr, 2012
Hi Grethe,

In ChronoForms v4 you can use the Multi-language action for this.

Build your form using place-holders where you want to translate the text. I prefer to use easily identifiable place-holders like #NAME#

In the On Load (and/or On Submit events drag in one Multi-Language action for each language that you need. Open them up and start creating the translation list like this
#NAME#=Name
#EMAIL#=E-mail
#TREE#=Tree
and repeat for each language
#NAME#=Nom
#EMAIL#=Courriel
#TREE#=Arbre

You can use this method to translate almost any text in your form.

The exceptions I know of are the Validation error messages and Date-picker settings. There are ways of handling those if you need them.

Bob
glambrecht 02 Apr, 2012
thank you very much
I think - this answered everything
(will be back if I can't make it function!)
thanks😛
pbaumann 16 Jul, 2012
Hi there,

I tried to do this. Translation of the form works fine, but I get this error message when submitting the form:

Fatal error: Class 'CfactionMultiLanguageHelper' not found in /.../administrator/components/com_chronoforms/form_actions/email_gh/email_gh.php on line 162

I'm using your custom email action, it seems that it's not compatible with multi language, right?
GreyHead 17 Jul, 2012
Hi pbaumann,

It looks as though Max has changed the way translation is done in the latest version and I hadn't spotted the change. I'll update the action but meanwhile if you edit administrator/components/com_chronoforms/form_actions/email_gh/email_gh.php around line 157 to comment out this block then I think it is working OK.
		//dirty hack for now, need something better later
		//translate any email content
/* <-- comment out from here -->
		foreach ( $form->form_actions as $form_action ) {
			if ( $form_action->type == 'multi_language' ) {
				$form->loadActionHelper( 'multi_language' );
				$CfactionMultiLanguageHelper = new CfactionMultiLanguageHelper();
				//$email_body      = $CfactionMultiLanguageHelper->apply( $form, $form_action, $email_body );
				$email_body      = $CfactionMultiLanguageHelper->translate( $form, $form_action, $email_body );
			}
		}
<-- to here --> */
		//end translation

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