The post briefly explains to you, how you can add Google Translate on Smartforms. Why do you need this? If you want to make your Smartforms multilingual, there are a number of ways how you can achieve this:
- Download and install a community Language control from http://community.k2.com/
- You can purchase a K2NE Language Control, which is a powerful and supported way to translate your Smartforms and all the Smartforms controls.
- You can use Google Translate and embed it directly into your Smartform. Google Translate allows you to instantly translate your website into 60+ languages and it is the best choice, when you do not want all the translating manually OR when you are working with K2 Cloud. The only limitation is that your user should have an Internet connection for the control to work.
Go to https://translate.google.com/manager/website/ and sign in to your Google account when you are prompted to.
Click on the “Add to your website now” button. On the next page you will have to complete the following:
- Enter the URL of your website into the Website URL field
- Select the default language of your website.
- Click Next button.
On this page you will choose whether you want to be able to translate into all of the available languages, or only the languages that you choose. You will also choose how the translate widget will look on your website, and advanced features. When you’re done making these choices, click Get Code.
- Copy the code, which you can see on the Google Site
- Add it to a literal Data Label on Smartform. The copied piece of html is too big to insert it into the text property of the Data Label. Therefore, you will need to bind the Data Label to an expression, which will contain the copied piece of html/js.
- Save everything and open the Smartform to test your results.
Here is a short video, how you can use Google Translate on Smartforms: