There will be several public forms that I am creating that will have the requirement for users of different languages to be able to fill them out. Instead of creating separate forms for each language, is it possible to incorporate Google Website Translator into the Form pages?
The configuration of the Google Translator is quite simple and provides javascript code to place in the header and body of a webpage to enable the translation ability. Is it possible to embed this within a form? And if so, how?
Question
Question
Is it possible to incorporate Google Website Translator into Forms?
Answer
If all you need to do is include a script reference, you should be able to do this. Check out this page in the online help and scroll to the last example on the page. That should give you the code you need to include a reference to an external script with your form.
If you do attempt to include the Google translator plugin and you use a Custom HTML field for some of the code, be careful and make sure you validate the HTML prior to including it in the Custom HTML field. I'd make a copy of the process and try to get it working in that one and then port those changes over.
With the Google Translate code, you do not insert JavaScript into the header, but rather a meta tag <meta name="xxxxxx" content="xxxxxx" ></meta>. How would one go about adding that to the header tag?
you can do an append in javascript to the header tag. Have it be performed onload. That should add it in once the page loads.
Answered my own question. Here it is:
var script = document.createElement('meta'); meta.name = "google-translate-customization"; meta.content = "xxxxxxxxxxxxxxxxxxxxxxxxx"; document.getElementsByTagName('head')[0].appendChild(script);
Replies
You can modify forms pages but it is not well recommended.
Maybe add a step to the business process where a user selects the language they need and then hit "Submit" and then they are routed to the proper form. With this, you could have the variables remain the same no matter which version is used and then continue with your process.
Last bit of advice, check out the "Script" tab when you edit a form to add in functionality there as well. Might want to reference a file on the forms server within your added code to ensure you dont reach the character limit of the CSS or Javascript fields