Developer Blog | SiteApex Support
Developer Tools
This is currently a reference page. Stephen Hermer wants to make a developer/programmer blog here, with one post a week or so (during lunches).

Adding Google Translation to your site

You can reach a larger audience by adding the Google Translate Widget to your site. Adding the widget is easy, and allows your site to be translated into more than 100 different languages!

There are several ways you can add translation to your pages, but in each case you will need to paste the following module code (or customize your own at the Google Translate Widget page):

<!-- Google Translate Widget -->
<div id="google_translate_element"></div>
<script>
function googleTranslateElementInit()
{
new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script>
<script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<!-- /Google Translate Widget -->


Method 1: Template Plugin ManagerUnder "Control Panel" in your SiteApex administration, click on "Templates" and then click the "plugins" link for the appropriate template. You can then select the appropriate plugin location, select the "Other" plugin type, and paste your widget code into it. After saving and publishing, all pages that use that template will display the Google Translation Widget in that location.** Currently Broken ** We are looking into this issue, it appears to be related to additional security on most of our servers.

Method 2: Edit the Page Template(s)If you have FTP access, and know a little about HTML, you can simply edit the appropriate page templates yourself, pasting the Google Translation Widget code in where you want it. This is a good option for templates when you want translation to be available on a permanent basis.


Like any external web service, the Google Translation Widget has its own terms of service which are subject to change... but if you want your content to be available to people who do not speak your primary language, it is an excellent solution!
Comments
Login to post comments.