News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Google Translation by BurkeKnight Enterprises

Started by Burke ♞ Knight, December 21, 2008, 06:03:02 PM

Previous topic - Next topic

Burke ♞ Knight

Link to Mod

Google Translation by BurkeKnight Enterprises

Version: 2.0 Date: 7/1/13
Compatibility: 1.1.x and 2.0

Made by: BurkeKnight - BurkeKnight Enterprises

This modification adds Google Translation buttons to the default theme.
There are three different versions:

BK_Modding_Google_Translator_2.0.zip
Places them in the user section, under the Total time logged in line. (1.1.x & 2.0)

BK_Modding_Google_Translator_News_Rep_2.0.zip
Replaces the news box. (2.0 Only)

BK_Modding_Google_Translator_Top_2.0.zip
Replaces the SMF Logo. (2.0 Only)

This mod only changes to the desired language for reading. If login or try to post, it will revert to the default site language.

Languages include:
French
German
Italian
Dutch
Spanish
Portuguese
Korean
Chinese
Japanese
Greek
Arabic
Russian

Support:

If need support for this mod, please go to BurkeKnight Enterprises and register there.

We have a support ticket system for mod support.

We will no longer be supporting this mod here at the SMF site,
as we feel it is easier to keep all support at our site.


Sabre™

VERY nice!
I dont have multilingual sites, but Im definitely going to give this a run!
Great idea mate.

+k
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Burke ♞ Knight

As stated above, will not stay in the translated language, when try to log in.
This is due to how Google's translator is coded.
This mod is mainly just to help people read a page in their language.
Great for long topics that guests can see. :)

Sabre™

#3
Yes indeed mate.
Im quite fascinated with it.
I really didnt enjoy using babelfish or something when translating a page on someones site, but atleast when they now come to mine, that just need to click the button :D

As stated..  Great idea mate :)

I'd give you another +k, but on my sites you gotta wait 7 hours to give up the next one lol ;)
Who am I to break the rules I expect others to follow!?  lol
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Sudhakar Arjunan

Its an excellent mod.

I am now looking to transfer the codes to match xmas theme by dziner studio.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

averyxie

Great mod, I'm going to give this a run!

Burke ♞ Knight

Thank you. :)

Just remember, people:

As stated above, will not stay in the translated language, when try to log in.
This is due to how Google's translator is coded.
This mod is mainly just to help people read a page in their language.
Great for long topics that guests can see.

adp

I love this mod, but, why this not translate to english?
I have a non-english forum :)

Burke ♞ Knight

Because, Google seems to think that all sites originate in English...LOL :P

Filipina

I noticed a lot of google translations in tagalog now... is this a recent update which might work in the MOD soon :)

Burke ♞ Knight

I have not looked into that yet, so do not know.

When I made this mod, I really basically just submitted it, due to the fact that sometimes, people would like to read the info posts of a site in their language, before they decided to join it, so they'd have an idea of what the site was about. I really did not expect it to be so popular, with the limitations of not staying in the translated version if log in.

As for future updates, only the future can tell... :P

Filipina

Quote from: BurkeKnight on December 27, 2008, 06:15:34 PM
I have not looked into that yet, so do not know.

When I made this mod, I really basically just submitted it, due to the fact that sometimes, people would like to read the info posts of a site in their language, before they decided to join it, so they'd have an idea of what the site was about. I really did not expect it to be so popular, with the limitations of not staying in the translated version if log in.

As for future updates, only the future can tell... :P

To me it would be like a break through... I have so many shy members from the Philippines that never post because they do not completely grasp the English language, but if they could read the posts in Tagalog first it would make a huge difference.  I will hope this can be done for the future :)

Filipina

Hi!  I was able to get this great MOD installed and use Tagalog as one of the choices yippy!  The only problem is my index.template file is not exactly right and i think the flags are in the wrong place. 

http://www.melindaspenpals.com/penpal-community/index.php

Is there anyway you could look at this file and possible help make the flags show up right? It was conflicting with the Google Ads and I cannot get it to be like yours is showing :)

Also are the flags suppose to show up when you log in?

Thanks for any help

Burke ♞ Knight

Actually, how I see it, it looks neat there. If you could just get them to be centered, I'd leave them there. :)

Filipina

Actually you are right it is beautiful man!  I centered it.  Wow what an awesome MOD:)  I added Tagalog and Vietnamese.  I just uses this page below to find out what languages could be translated.

http://translate.google.com/

Then I just used your code on the index.template page and like for Tagalog I just changed a couple little letters and same goes for Vietnamese. Then I just added the code in the modifications.english file and boom it's done. Oh, and I made a couple buttons. 

The cool thing is even if people are logged in and they click the flag it only temporarily logs you out... you can at anytime click the "View original web page" in the translation area and you are still logged in and back to English. This MOD has the potential to really grow a community.  Thanks again for the MOD

Sabre™

I was convinced to hide this from users, as they cannot use it, only guests, so moved the code up a lil so only guests see this. It made more sense.

So instead of
</form>';
}

echo '
<a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Cfr&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/franceflag.png" alt="', $txt['bksmf_french'], '" title="', $txt['bksmf_french'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Cde&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/germanflag.png" alt="', $txt['bksmf_german'], '" title="', $txt['bksmf_german'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Cit&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/italyflag.png" alt="', $txt['bksmf_italian'], '" title="', $txt['bksmf_italian'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Cnl&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/netherlandsflag.png" alt="', $txt['bksmf_dutch'], '" title="', $txt['bksmf_dutch'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Ces&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/spainflag.png" alt="', $txt['bksmf_spanish'], '" title="', $txt['bksmf_spanish'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Cpt&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/portugalflag.png" alt="', $txt['bksmf_portuguese'], '" title="', $txt['bksmf_portuguese'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Cko&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/koreaflag.png" alt="', $txt['bksmf_korean'], '" title="', $txt['bksmf_korean'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Czh-CN&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/chinaflag.png" alt="', $txt['bksmf_chinese'], '" title="', $txt['bksmf_chinese'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Cja&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/japanflag.png" alt="', $txt['bksmf_japanese'], '" title="', $txt['bksmf_japanese'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Cel&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/greeceflag.png" alt="', $txt['bksmf_greek'], '" title="', $txt['bksmf_greek'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Car&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/arabflag.png" alt="', $txt['bksmf_arabic'], '" title="', $txt['bksmf_arabic'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Cru&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/russiaflag.png" alt="', $txt['bksmf_russian'], '" title="', $txt['bksmf_russian'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a></td>
</tr>
</table>
</td>
</tr>
</table>';


I have
</form>
<a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Cfr&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/franceflag.png" alt="', $txt['bksmf_french'], '" title="', $txt['bksmf_french'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Cde&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/germanflag.png" alt="', $txt['bksmf_german'], '" title="', $txt['bksmf_german'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Cit&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/italyflag.png" alt="', $txt['bksmf_italian'], '" title="', $txt['bksmf_italian'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Cnl&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/netherlandsflag.png" alt="', $txt['bksmf_dutch'], '" title="', $txt['bksmf_dutch'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Ces&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/spainflag.png" alt="', $txt['bksmf_spanish'], '" title="', $txt['bksmf_spanish'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Cpt&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/portugalflag.png" alt="', $txt['bksmf_portuguese'], '" title="', $txt['bksmf_portuguese'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Cko&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/koreaflag.png" alt="', $txt['bksmf_korean'], '" title="', $txt['bksmf_korean'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Czh-CN&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/chinaflag.png" alt="', $txt['bksmf_chinese'], '" title="', $txt['bksmf_chinese'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Cja&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/japanflag.png" alt="', $txt['bksmf_japanese'], '" title="', $txt['bksmf_japanese'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Cel&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/greeceflag.png" alt="', $txt['bksmf_greek'], '" title="', $txt['bksmf_greek'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Car&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/arabflag.png" alt="', $txt['bksmf_arabic'], '" title="', $txt['bksmf_arabic'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> <a href="http://www.google.com/translate_c?hl=en&amp;langpair=en%7Cru&amp;u=', $scripturl, '"><img src="', $settings['images_url'], '/russiaflag.png" alt="', $txt['bksmf_russian'], '" title="', $txt['bksmf_russian'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a>';
}

echo '
                   </td>
</tr>
</table>
</td>
</tr>
</table>';


so now only guests see this.

Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Mick.

Very cool mod.  Thank you.

www.chevyavalancheclub.com


I also edited the code to only show for guests only.  I applied the code right after the "login" "password" code strings.   Once logged in,you dont see it.

Also i had to replace 1 image and change the size on .css file to make it fit.


Thanx BK!  You rock dude..

I AM Legend

Hey All,
where do I edit to make it so only guests can see this?

Burke ♞ Knight

Look two posts above yours. :)

Sabre™ made a nicer post than I would have. :)

I AM Legend

cool, what php file is that edit in?

Advertisement: