News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Quick Translation

Started by Bugo, October 17, 2010, 12:55:02 PM

Previous topic - Next topic

Bugo

Why? It seems language auto detect works very well. For example, If any user uses browser with german language, he will get translation on german etc. I like this feature.

Tomy Tran

He may use a fake IP to access some pages or sites. The faked IP may refer to another country which not use his language. E.g: I am using Vietnamese but when I use fake IP, my country is USA, that time, it automatically refer to English :D

Bugo

And what? This is not my problem :)

If you want change it, you can do it. But don't forget about license agreement.

BaghdadGhost

thanks for the reply. see the case is now it just translates from site language to English. it does not translate from English to site language. some members post stuff in English and other members dont speak it so they need something to translate the English for them.



Eclipse16V

#104
Thanks Bugo
Works fine

EDIT:
I still have a small question.
How can I make the text of the button is gone and only appears as alt="..." and title="..."?
I worked with:
SMF 2 in German

Shop:
SID Giessen

BaghdadGhost

Quote from: Bugo on December 12, 2011, 04:21:21 AM
And what? This is not my problem :)

If you want change it, you can do it. But don't forget about license agreement.

no I dont wanna edit it. I just want to know if its possible to have the mod translate from and to English. basically from the site language to English and the other way around.


thanks

Bugo

Quote from: Eclipse16V on December 14, 2011, 03:57:53 AM
How can I make the text of the button is gone and only appears as alt="..." and title="..."?
I don't know. Ask Google.

Quote from: BaghdadGhost on December 14, 2011, 06:17:44 AM
I just want to know if its possible to have the mod translate from and to English. basically from the site language to English and the other way around.
Use Google Translator for that.

krash661

Something weird happened..my quick language button is missing..it used to be there and i just notice it is not there any more,what caused this and how do i fix it?

krash661

Quote from: Bugo on December 10, 2011, 09:31:46 AM
Well, unfortunately, Google closed his Translate API:
Quote

    The Google Translate API has been officially deprecated as of May 26, 2011. Due to the substantial economic burden caused by extensive abuse, the number of requests you may make per day will be limited and the API will be shut off completely on December 1, 2011.

Now is December 12, so this mod is more not works :(

Ok, I have made a new version by using other API. Try it now.
ahhh..so the API is shut off..that's why its not showing...
so where do i get this new version?

BaghdadGhost

now its 0.7 you can find it here http://custom.simplemachines.org/mods/index.php?mod=2794


what version do you have installed?


krash661

Quote from: BaghdadGhost on December 23, 2011, 02:16:13 PM
now its 0.7 you can find it here http://custom.simplemachines.org/mods/index.php?mod=2794


what version do you have installed?

I found it all..it's working fine..
I agree with you on " see the case is now it just translates from site language to English. it does not translate from English to site language. some members post stuff in English and other members dont speak it so they need something to translate the English for them. "

BaghdadGhost

Quote from: krash661 on December 23, 2011, 02:35:34 PM
Quote from: BaghdadGhost on December 23, 2011, 02:16:13 PM
now its 0.7 you can find it here http://custom.simplemachines.org/mods/index.php?mod=2794


what version do you have installed?

I found it all..it's working fine..
I agree with you on " see the case is now it just translates from site language to English. it does not translate from English to site language. some members post stuff in English and other members dont speak it so they need something to translate the English for them. "

I wish Bugo consider my previous suggestion to add an option to be able to chose one more language with English. in the previous version we had a list of all languages and it was kinda hard to find user language. he already suggested to use google translate mod, but this mod translates the whole page, which at some point either does not work properly or mess up everything. while the unique thing about this mod is dedicated to replies only.

after all this is a great effort from Bugo.

thanks


krash661

lol I forgot to uninstall the older version before i installed the .7..then after i installed the new version(.7) there was no uninstall for the older version,so i had to just delete it...will this effect anything on my stuff or site??

BaghdadGhost

if you dont have the old version I can give it to you so you either use parser to follow manual uninstalling or just reverse the operations of installation.


krash661

Quote from: BaghdadGhost on December 23, 2011, 02:56:57 PM
if you dont have the old version I can give it to you so you either use parser to follow manual uninstalling or just reverse the operations of installation.
lol i dont know how to or understand how to do all that file changing and stuff..if theres another way to bring it back and then uninstall it,then yeah...i had .5 version

Bugo

Well, someone has to give you 0.5 version. I don't collect old versions.

BaghdadGhost

just to be on the safe side delete the new version via package manager.

do the following and I hope I am not mistaking

go to themes/default/css/ and delete jTextTranslate.css

go to themes/default/images/ and delete the folder  jTextTranslate


now in themes/default/scripts delete jquery.TextTranslate.js


in themes/default/Display.template.php find and delete

// Quick Translation
echo '
<script type="text/javascript">window.addEvent && document.write(unescape(\'%3Cscript type="text/javascript"%3EjQuery.noConflict();%3C/script%3E\'))</script>
<script type="text/javascript"><!-- // --><![CD' . 'ATA[
var text = document.getElementById("msg_', $message['id'], '").innerHTML;
var tmp = document.getElementById("msg_', $message['id'], '").innerText;
if ( typeof(tmp) !== "undefined") {  text = tmp;  }
google.language.detect(text, function(result) {
text = text.substring(0, 50);
if (!result.error)
{
var language = "unknown";
for (l in google.language.Languages)
{
if (google.language.Languages[l] == result.language)
{
language = l;
break;
}
}

origin_text_lang = google.language.Languages[language];
jQuery("#msg_', $message['id'], '").translate({
original: origin_text_lang
});
}
});
// ]' . ']></script>';


if you are using a custom theme repeat the above operations on your theme folder and display file


in sources/Display.php find and delete


// Quick Translation
$context['html_headers'] .= '
<link rel="stylesheet" type="text/css" href="' . $settings['default_theme_url'] . '/css/jTextTranslate.css" />
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">google.load("language", "1");</script>
<script type="text/javascript">!window.jQuery && document.write(unescape(\'%3Cscript src="http://code.jquery.com/jquery.min.js"%3E%3C/script%3E\'))</script>
<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/jquery.TextTranslate.js"></script>';


now you can re-install the new version.


enjoy  :)

krash661

Quote from: Bugo on December 23, 2011, 03:21:23 PM
Well, someone has to give you 0.5 version. I don't collect old versions.
so if i can get a hold of the .5 version again, i can reinstall it and then uninstall it,then i should be fine?

Bugo

No, you need put mod archive to Package dir and then uninstall mod via Package Manager area.

krash661

Quote from: BaghdadGhost on December 23, 2011, 03:24:00 PM
just to be on the safe side delete the new version via package manager.

do the following and I hope I am not mistaking

go to themes/default/css/ and delete jTextTranslate.css

go to themes/default/images/ and delete the folder  jTextTranslate


now in themes/default/scripts delete jquery.TextTranslate.js


in themes/default/Display.template.php find and delete

// Quick Translation
echo '
<script type="text/javascript">window.addEvent && document.write(unescape(\'%3Cscript type="text/javascript"%3EjQuery.noConflict();%3C/script%3E\'))</script>
<script type="text/javascript"><!-- // --><![CD' . 'ATA[
var text = document.getElementById("msg_', $message['id'], '").innerHTML;
var tmp = document.getElementById("msg_', $message['id'], '").innerText;
if ( typeof(tmp) !== "undefined") {  text = tmp;  }
google.language.detect(text, function(result) {
text = text.substring(0, 50);
if (!result.error)
{
var language = "unknown";
for (l in google.language.Languages)
{
if (google.language.Languages[l] == result.language)
{
language = l;
break;
}
}

origin_text_lang = google.language.Languages[language];
jQuery("#msg_', $message['id'], '").translate({
original: origin_text_lang
});
}
});
// ]' . ']></script>';


if you are using a custom theme repeat the above operations on your theme folder and display file


in sources/Display.php find and delete


// Quick Translation
$context['html_headers'] .= '
<link rel="stylesheet" type="text/css" href="' . $settings['default_theme_url'] . '/css/jTextTranslate.css" />
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">google.load("language", "1");</script>
<script type="text/javascript">!window.jQuery && document.write(unescape(\'%3Cscript src="http://code.jquery.com/jquery.min.js"%3E%3C/script%3E\'))</script>
<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/jquery.TextTranslate.js"></script>';


now you can re-install the new version.


enjoy  :)
wouldn't this be changing files and stuff?

" i dont know how to or understand how to do all that file changing and stuff "

Is there another way?

Advertisement: