Page 1 of 1

google translate on website

Posted: Mon Feb 01, 2010 9:14 pm
by dhottinger
I would like to have the google translate show on my cms website.  They have the code on their site to copy and paste into a website: 
function googleTranslateElementInit() {
  new google.translate.TranslateElement({
    pageLanguage: 'en'
  }, 'google_translate_element');
}


When I copy this code, I get a smarty error.  Is this not possible with cms made simple?  I would like visitors to choose their language, and have the entire page translated.

thanks,

Re: google translate on website

Posted: Mon Feb 01, 2010 9:30 pm
by Dr.CSS
If you read one of the default install templates at the top it tells you...

{* the literal below and the /literal at the end are needed whenever there are {"curly brackets"} as smarty will think it's something to process and will throw an error *}

So anything you put in a page or template that has {  }  in it and is not one of the tags cmsms uses then you need the {literal} stuff around it...

Re: google translate on website

Posted: Mon Feb 01, 2010 11:59 pm
by dhottinger
Got it thanks,

I missed the literal settings thanks for the heads up. 8)

Re: google translate on website

Posted: Tue Feb 02, 2010 6:49 am
by Dr.CSS
There is all kinds of interesting stuff that can be learned from a default install of CMS Made Simple on the front end and in the back end looking thru templates and style sheets...

Please to mark the original post as [solved] in the subject line...