Translation Block using Google

Translation Block using Google

by Jeffery Watkins -
Number of replies: 0

Hi Everyone,

Well... here is my first attempt at a block...  I took a translation block from PostNuke which uses google and using the NEWBLOCK folder from the contrib directory on cvs tried to put it together.

You can see it at www.socialstudies.ws/digital

Here is the problems I am having with it.

  • Moodle has to be open to Google.
  • When a site is translated, you become logged in as Guest, no matter if you were logged in before.
  • The code requires a base url, if I put that in manually...ie www.something.com, no matter where I am on the site, if I translate, it starts back there.  Is there a php variable like...getbaseurl so it starts at whatever page you happen to be on?

I don't know how useful this will be because I believe that using the google translation will always be just a guest login... this means that a logged in user will not be able to use translation, b/c it will relog them in as Guest.

But as a simple front page translator...its great.

Maybe there is a way around this, but I have exhausted my meager abilities at coding just getting this far...lol

BTW, I also tried it with the babelfish translation script... and that won't even log you in as guest.

Jeff

I attached the files... I think I have it all set up correctly, but please test on a test site or local server first....

Average of ratings: -