Code

Discussion on Ajax Translator Revolution Lite jQuery Plugin

Discussion on Ajax Translator Revolution Lite jQuery Plugin

Cart 658 sales

SurStudio supports this item

Supported

This author's response time can be up to 2 business days.

136 comments found.

Hello Fred,

Sorry for the delayed response. I also have IE version 9.0.8112.16421. I fixed the issues you mentioned but that didn’t solve the problem. It turns out I had compatibility view enabled and once it was disabled everything worked without any issues. Not sure if it should work in compatibility view or not. Just worried is a visitor has it enabled they wont see the language bar. Any ideas on how to solve that or is that just the way it is with IE9 ? Thanks again for your help.

-Jason

Hi Jason,

the script works fine regardless the user has disabled “compatibility view” or not, and you can try that in the example page: http://surstudio.com.ar/translator-lite-examples.html

Please try the new fixes I told you in the other message.

Cheers, Fred

Hello Fred,

This script is working fine in Firefox 6.0 & Google Chrome 13 but it is not showing up in IE9 . Here is the link to my test site – http://basarangrinder.com/abc/companyprofile.php. Please let me know if you have any ideas. Thanks for your help.

Hi Basaran,

I’m testing your site in my IE9 and works fine. Could you please tell me what version are you using? mine is 9.0.8112.16421

Also, please do these things for me:

1.- Maybe you have done this already, but I need to be sure. Please clear your cache and try again.

2.- Press F12 , and the Developer Tools will show up. The 4th tab is Script, click it. See if in the right pane there’s an error.

3.- You’re including the jQuery library like this:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> 
See the src attribute, it doesn’t start with “http:”, please fix it and try again.

4.- You also have this in case the Google CDN fails:

<script>!window.jQuery && document.write(unescape('%3Cscript src="js/libs/jquery-1.4.2.min.js"%3E%3C/script%3E'))</script>
for testing purposes only, just include the jQuery library in the regular way and use an absolute path: /abc/js/libs/jquery-1.4.2.min.js this is just for testing, Microsoft browsers stink. 5.- You can add an alert sentence to see if the js library is being loaded, for instance:
$.translator.ready(function() {

  alert("Library loaded");

  $(".translator").translator({
    autoSelect: true,
    ...
  });

  alert("Ok, didn't crash during the initialization routine");

});

Please let me know…

Cheers, Fred

Yes! Client wanted Mexican flag!

Just sent the FTP to you via your profile.

Thanks again! FB

Alrighty, I sent you an email. Please take a look.

Cheers, Fred

Hi Fred! Sorry to bother again but just not sure everything works as it’s supposed too. Can the whole site stay in spanish once you click the spanish flag once – then the whole site revert back once you click the english flag?

Also the flags arent showing up on IE and on say chrome on some menu items you have to click the item like FAQS twice for the flags to show up even though everything is the same from one page to another.

Cheers and thanks so much for your time! I can email the FTP details if that helps. FB http://www.aa-llp.com

Hi FB,

I checked your site, if I inject the initialization string, the translator shows up, and I’ve seen that you’re using the Peru flag for Spanish, right?

Your home page still has an error on the custom.js file. However, your adamson-ahdoot-law-contact.html page seems to be fine. So we can do this, please duplicate this file with another name, and send me an email with the FTP access so I can make a couple of tests.

Cheers, Fred

nevermind, I found some other issues with that script now so I just removed it.

Great, glad to know you fixed it and it’s working fine now :)

Hello,

Great script, it is working fine so far except for one issue. I am using the Direct Me location script on my site. When the page first loads the script works fine and the direction window opens as a pop-up as it should. When I select a language to translate my site and then try to click the direction link it no longer works correctly. Instead of a pop-up the whole page opens up the link. I wanted to see if you had any ideas what is causing this.

My test link is – http://www.basarangrinder.com/zx

-Thanks

Hey Fred,

Worked like a charm ;)

Thanks for such a quick reply, the help, and again for the cool plugin my friend!!

All the best – until next time :)

Moe

Hi Moe,

glad everything worked fine, and thanks for your kind message :)

Cheers, Fred

Hi,

Thanks for the cool plugin!!!

Quick question, how do I show only the language names using their native characters? Similar to the way Twitter and Facebook displays their available languages.

Moe

Hi Moe,

glad you like the plugin!!

In order to change the default languages names you’ll have to build the translator “by your own”, this is not as scary as it sounds, please take a look to the Installation Guide, point 3 & 4: http://surstudio.com.ar/translator-lite-installation.html#index-3

So instead of an empty container for the translator, you should place the custom HTML code, an example of English and Thai languages would be (comments here seems like they aren’t encoded as utf-8, so that’s why there are ”???” instead of the extended characters):

<div class="translator translator-container translator-names">
    <div class="translator-sub-container">
        <table cellspacing="0" border="0" cellpadding="0">
            <tbody>
            <tr>
                <td><a href="javascript:;" class="translator-language-en" title="English"><span>English</span></a></td>
                <td><a href="javascript:;" class="translator-language-th" title="???"><span>???</span></a></td>
            </tr>
            </tbody>
        </table>
    </div>
    <div class="translator-hidden translator-restore-container">
        <a href="javascript:;" class="translator-restore" title="Restore">Restore</a>
    </div>
</div>

Then, initialize the translator in the regular way:

<script type="text/javascript">
$.translator.ready(function() {
    $(".translator").translator();
});
</script>

Let me know if you need more help

Cheers, Fred

Great thanks Fred!

It worked here: http://aa-llp.com/adamson-ahdoot-law-disclaimer6.html

when I did the changes you suggested and also I removed a script containing the line below toward the bottom of the page. (about line 105)

jQuery.noConflict();

When i kept in in it didn’t work: http://aa-llp.com/adamson-ahdoot-law-disclaimer5.html

Anyway that’s great. I’ll go ahead and change the other pages.

Lastly is there an easy way to:

1) just have English and Spanish? 2) Not effect the menu class – think i’ll leave the menu as the words are much longer they screw up the menu bar once translated into spanish!

Cheers and thanks so much! FB

Hi FB,

glad to know it worked :)

I’m not sure if you should remove the jQuery.noConflict();, that might affect one of your scripts.

About your questions:

1)

jQuery.translator.ready(function() {
    jQuery(".translator").translator({
        languages: ["en", "es"],
        flagsFolder: "translator/images/" 
    });
});

2)

jQuery.translator.ready(function() {
    jQuery(".translator").translator({
        languages: ["en", "es"],
        excludeSelector: "#menu-navigation span span strong, #menu-navigation em",
        flagsFolder: "translator/images/" 
    });
});

Notice the excludeSelector setting, has two values because didn’t know if you wanted to completely exclude the menu, or just its titles.

You might want to take a look to the help files ;)

One comment, http://aa-llp.com/adamson-ahdoot-law-disclaimer6.html still has the error in the custom.js file, line: 140

Cheers, Fred

Hi Fred – made those changes but now not seeing the flags at all (when I removed the HTML ). Added all the files to the server and tested them successfully below using one of your sample files so I know everything is in place.

http://aa-llp.com/sample-2.html

Here’s the file:

http://aa-llp.com/adamson-ahdoot-law-disclaimer5.html

This below has the code from sample-2.html cut and pasted in and nothing shows up here either!

http://aa-llp.com/adamson-ahdoot-law-disclaimer5b.html

Don’t know anything about jQuery so not sure what I’m doing wrong.

Thanks for your help! Cheers FB

Hi FB,

you’ve made those changes, but you also have added a second jQuery library to your pages:

<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script> 

If your scripts need the 1.4.2 version, no problem, just move it to the top, and replace the 1.6.1 version. On top of your page you have:

<link href="translator/styles/jquery.translator.css" rel="stylesheet" type="text/css" /> 
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script> 
<script src="translator/javascript/jquery.translator.min.js" type="text/javascript"></script> 

so take the 1.4.2 version, and place it up there:

<link href="translator/styles/jquery.translator.css" rel="stylesheet" type="text/css" /> 
<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script> 
<script src="translator/javascript/jquery.translator.min.js" type="text/javascript"></script> 

Then, the flags are in the ”/translator/images/” folder, so instead of initializing the translator like this:

jQuery.translator.ready(function() {
    jQuery(".translator").translator();
});

use:

jQuery.translator.ready(function() {
    jQuery(".translator").translator({
        flagsFolder: "/translator/images/" 
    });
});

I’ve injected this into your page, and worked fine.

Another comment, one of your css is messing up a little with the translator, so you’ll have to edit the translator/styles/jquery.translator.css file, the 3rd selector is:

.translator-sub-container table {
    text-align: center;
    margin: 0 auto;
    height: 20px;
}

add one line:

.translator-sub-container table {
    text-align: center;
    margin: 0 auto;
    height: 20px;
    border-collapse: separate;
}

That will do it.

Cheers, Fred

ps: I’ll add this little css modification to the package’s files, but that might take a day or two to become public because of the approval procedure.

Hi there – just unable to get the plugin working so far:

http://aa-llp.com/adamson-ahdoot-law-disclaimer5.html

Not sure what I’m doing wrong. Tried removing all the jquery.min.js files as well. I’m using fontface for font replacement. Would that be the issue?

Cheers and thanks! FB

Hi FB, thanks for buying.

I’ve checked your website. One of your multiple scrips should be calling the jQuery.noConfict() function, because on my js console I’m seeing that the $ does not exist.

So, instead of using the $ function, just use jQuery instead:

$.translator.ready(function() {
    $(".translator").translator();
});

replace it with:

jQuery.translator.ready(function() {
    jQuery(".translator").translator();
});

Another comment, you’re placing a piece of HTML code by yourself, you can delete that:

<div class="translator translator-container translator-jquery translator-flags-and-names"> 
    <div class="translator-sub-container"> 
    ...
</div></div>

Seems like you haven’t uploaded the images folder to the site’s root, so you will have to specify the images location using the flagsFolder setting.

One more comment, I’ve checked http://aa-llp.com/, and there’s a javascript error on the custom.js file, line 140: $(document).ready(function(){, this error is another consecuence of one of your scripts calling the jQuery.noConfict() function. I recommend you to place jQuery instead of $, I don’t know what browser are you using, but Chrome has a very nice built-in javascript console (control+shift+j) or you can also download the Firebug plugin for Firefox.

Let me know if you need more help.

Cheers, Fred

Hello! Can this be used in Wordpress?

Hi there,

yes, it can be used. However you will have to manually install it in your theme, if you don’t know how to do it, I can help you out, is pretty simple, should take no more than 5 minutes. Assuming you would like to place the translator at the top of the website, you’ll need to edit the header.php file to load the js and css files, and initialize the translator, that’s all.

The most important thing is that you will need to upload the files to your server, either with FTP or with some web file upload manager provided by your hosting provider.

Cheers, Fred

Hi,

Thanks for your answer.

Excuse, the opening of new a post! The moderator preferred to remove my question! :/

Is It possible to configure your script with Microsoft ?

Thanks !

Mick

Hi Mick,

currently is not possible to choose the Microsoft Translate API . But is something that I’ll probably do soon. I’ll send you another message when it’s available.

Cheers, Fred

Worked great, thanks!

Hi dJagg, thanks for buying :)

Yes there’s a way to accomplish what you need. You need to specify the source language by using the from option, and set autoSelect to true (autoSelect is true by default).

$(".translator").translator({
  autoSelect: true,
  from: "fr" 
});

Let me know how it works.

Cheers, Fred

Hi there, I just purchased it, works great!

I have a question: my website is in French, is there a way to have the French language selected by default?

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey