2012-11-10, 02:41:37
If anyone is still having a hard time with the multi-language support of this plugin, I finally got it to do what I needed by:
1) Selecting "Default" in the Language section of the p01contact configuration plugin in the admin panel;
2) Placing the following code in my template body where I want the contact form across all pages:
<?php if ($language == 'cz') { $p01contact->default_lang = 'cz'; echo $p01contact->parse('(% contact : name!, phone!, email!, message!, askcopy! %)'); } ?>
<?php if ($language == 'en') { $p01contact->default_lang = 'en'; echo $p01contact->parse('(% contact : name!, phone!, email!, message!, askcopy! %)'); } ?>
<?php if ($language == 'es') { $p01contact->default_lang = 'es'; echo $p01contact->parse('(% contact : name!, phone!, email!, message!, askcopy! %)'); } ?>
<?php if ($language == 'fr') { $p01contact->default_lang = 'fr'; echo $p01contact->parse('(% contact : name!, phone!, email!, message!, askcopy! %)'); } ?>
1) Selecting "Default" in the Language section of the p01contact configuration plugin in the admin panel;
2) Placing the following code in my template body where I want the contact form across all pages:
<?php if ($language == 'cz') { $p01contact->default_lang = 'cz'; echo $p01contact->parse('(% contact : name!, phone!, email!, message!, askcopy! %)'); } ?>
<?php if ($language == 'en') { $p01contact->default_lang = 'en'; echo $p01contact->parse('(% contact : name!, phone!, email!, message!, askcopy! %)'); } ?>
<?php if ($language == 'es') { $p01contact->default_lang = 'es'; echo $p01contact->parse('(% contact : name!, phone!, email!, message!, askcopy! %)'); } ?>
<?php if ($language == 'fr') { $p01contact->default_lang = 'fr'; echo $p01contact->parse('(% contact : name!, phone!, email!, message!, askcopy! %)'); } ?>