Version: 1.00, by Infopro
Developer Last Online: Jun 2016
Category: End-User Options -
Version: 4.1.0
Rating:
Released: 01-28-2011
Last Update: Never
Installs: 151
Template Edits
Re-useable Code Translations
No support by the author.
I'm not sure if anyone else has posted this, if so I apologize. I did find some other earlier versions of mods to use Google Translate, but could not find one similar and as simple to use as this.
In the footer template, find the first instance of:
You really should want that style stuff added to your CSS instead of here but this will place it up by the Advanced Search text as you wanted for now. (see attachment, added to vB default style)
I didn't want to spend much time on this today but If I find some time I'd like to tweak the CSS and js to not be called from Google. In doing so the drop down and menu could be styled a bit nicer to match your site.
The stuff inside the div can be placed where ever you like, the js should be placed as close to the bottom of your page as possible for speed. That's why I originally placed it in footer.
In looking into the CSS end of this I did find one small tweak some might like:
Simply add this to the additional.css template to hide the "toolbar thing" and the balloon tips.
We use Google Analytics and it provides a breakdown that shows visitors to our site by what language they're using.
It follows that there must be a variable on connection that can be interrogated to determine that information?
Would anyone know how to do that, so that we could have this mod display ONLY if the user is connecting using anything except English?
Thanks for any feedback..
Regards,
Doug
Not sure I follow you, but did you add your GA code to this? (marked in red in first post)
As for ONLY display if user is connecting using anything other than English, well, you can look at the google site in an earlier post and select your options yourself. Then just add your new code where this old code is located. This can be set to automatically translate and other things.
I really like this modification, though I noticed a increased loading time because it is connecting to the Google servers each time. Is there a possibility to use this modification and let it access the Google servers only when you actually need it?
I really like this modification, though I noticed a increased loading time because it is connecting to the Google servers each time. Is there a possibility to use this modification and let it access the Google servers only when you actually need it?
That's what I was trying to say, albeit badly, in my post above, repeated here:
Quote:
Originally Posted by BadgerDog
We use Google Analytics and it provides a breakdown that shows visitors to our site by what language they're using.
It follows that there must be a variable on connection that can be interrogated to determine that information?
Would anyone know how to do that, so that we could have this mod display ONLY if the user is connecting using anything except English?
but how to add URDU lang in it becouse Google Translater has urdu but this don't have. any sulotion?
In the code find:
Code:
pageLanguage: 'en',
Add this below:
Code:
includedLanguages: 'ur'
On the Translate Tools Site is where you'd generate the code if you need advanced options, you should have a close look there and at the auto generated code it provides.
Quote:
Originally Posted by BadgerDog
That's what I was trying to say, albeit badly, in my post above, repeated here:
I'm not sure I understand the increased loading time thing. Pages don't load any slower with this in footer that I can see.
If you mean the same thing as this comment:
Quote:
getting a constant "transferring data from translate.googleapis.com" in the status bar?!?!
as mentioned earlier, this is google's code. I can't account for the connection or accuracy of this tool. I didn't make the translator, I only added it to vB using the code I've shared here. I do not think that message in the footer of your browser is a problem, nor slowing page load speed when it's not being used.
When it is in use, sure the time it takes translate a page and finish "transferring data from translate.googleapis.com" to your browser there might be some delay.