Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...google’s translate toolsgoogle’s translate tools
Previous
 
Next
New Post
3/22/2012 3:26 PM
 

How do I get google’s translate tools to work using the html module. We are currently using DNN 5. something.

http://translate.google.com/translate...

 
New Post
3/22/2012 7:10 PM
 
you will need to clone the module and implement the API - if there really is a use case for it. IMHO the quality of automated translation is anything besides a useful service for users.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
3/23/2012 11:30 AM
 

I don't understand "clone the module and implement the API (application programming interface)" I do not have host privileges if that is needed. I am also fairly new working in DNN.

This is as far as I got:

I added an html module to the page.
In the module settings/advanced settings/header - I placed the script google supplies.

<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>>

It looked like it was going to work but I didn't get any of the dropdown items. I wasn't really sure what to put in the content area of the html module so this is what I used.:

<script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

Even though the quality of an automated translators are poor, for some of our site pages it would benefit the user. That said, can you suggest a module we can purchase that would do the same thing?

 
New Post
3/29/2012 12:34 PM
Accepted Answer 

Try the below steps to see if this resolves the issues you are seeing.  It looks like you had some placement/syntax issues with the code you provided.

  1. Open the HTML Moodule in edit mode
  2. Click the <html> icon at the bottom of the html box to get into the code-behind of the module.
  3. Put in this tag there: 
  4. <div id="google_translate_element"></div>
  5. Add that <script> tag to your module header.  You can't add the <script> tags directly in the code-behind for the HTML page, it will throw them out.  Move it to the header of your module.  To do so do the following:
  6.  Login as admin account (with edit permissions to the module)
  7. Click the 'Manage' button for that html module
  8. Go to the Module Settings tab.
  9. Expand Advanced
  10. You should see a 'Module Header" area.
  11. Drop all of your <script> code tags in there

<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>

 

Note: The above <script> code above you had a trailing ‘>’ after the last </script> tag, be sure to remove that in your script.  I’ve removed it above in what I pasted in.

 

Hope that helps.

Make it a great Day!
D-Man


___________________________________________ Make It a Great Day! D-Man
 
New Post
3/29/2012 2:07 PM
 
Thanks so much…that’s the kind of detailed help I currently need. As I improve my skills and  understand more, I won’t need such detailed attention.
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...google’s translate toolsgoogle’s translate tools


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out