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?

I AM Legend

Bump.
Sorry for bumping, been 3 days now,
Quote from: Sabre™ on January 02, 2009, 06:25:38 PM
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.



what php file is this edit in?

thanks.

Burke ♞ Knight

Index.template.php of the default theme.


mockingbird

#23
First of all: tnx for this mod. I had to apply manually, but it wasn't that hard :)

Hmmm, clicking one of the flags always makes it go back to the main index.php of the forum. Is there a way to make it show the translated version of the page we are on currently?

I guess $scripturl should be changed to something else? Like $currenturl? dunno?

PS: dunno if it matters, but we have the search-engine friendly url feature enabled.


mockingbird

super ganz geil total uber toll mega banana bump

TheListener

the index template failed  :(

How do I install this manually?

Realinfo

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

Sir I saw this site...........they have 14 Flags, but my site only has 12 flags............ and also I want flags' postion in Center............. also I want light Green colour on background of flags not white colour......................

Sabre™

@ TheListener
Do you still require assistance?

@ Realinfo
Something like this?


or this?



I moved the flags above the shrink button in the second image, so if that area is shrunk the flags will still be visible.
Someone may come up with a more satisfying layout for you, but this is all I could achieve with my limited knowledge and no template lol

Just post your index.template.php if you'd like me to assist you :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


ttuu

u can add Hebrew translation.

this is the code:

<a href="http://www.google.com/translate_c?hl=en&langpair=en%7Ciw&u=', $scripturl, '"><img src="', $settings['images_url'], '/Hebrewflag.png" alt="', $txt['bksmf_Hebrew'], '" title="', $txt['bksmf_Hebrew'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a>

and image flag is attached

TheListener

Quote from: TheListener on May 01, 2009, 09:37:36 PM
the index template failed  :(

How do I install this manually?

Hello Sabre have I seen you somewhere before?  ;D

The mod installed perfect although when I had a nosy at another language some of the tabs were missing ie home.

How do I rectify this?

Sabre™

No idea mate.
I can purely speculate that it is a problem with google translator processing your site.
But that's just like saying that "I am such a great specimen of a man, because God needed a gift to give to women", when in fact, I don't know why.  lol

Similar and/or the same happens for other sites also.
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


TheListener

Is there a way to add flags to the mod?


TheListener


bbmtalk

#34
Quote from: TheListener on July 28, 2009, 01:27:18 PM
Is there a way to add flags to the mod?

Yes see #29.

1. You can add the link and edit the language (the one in red) which you want to translate.

<a href="http://www.google.com/translate_c?hl=en&langpair=en%7Ciw&u=', $scripturl, '"><img src="', $settings['images_url'], '/yourgflag.png" alt="', $txt['bksmf_yourlangauge'], '" title="', $txt['bksmf_yourlanguage'], '" width="24" height="24" style="border: 0px solid ; width: 24px; height: 24px;" /></a> 

Also modify Modifications.english.php to add

$txt['bksmf_yourlanguage'] = 'yourlanguage';

3. upload the flag to themes/default/images

-------------------------------

One question - if I want place them in the bottom (above the powered by....) and centered, what are the codes to use?


wonslung

I have a problem, when i click a flag it seems to log out and translate only the index page, some forums are hidden to guests.  Is there anyway to make this stay logged in so it will translate that page?

scimmiotto

is there any translation of this mod for 20. rc2?
Loop code example:
The following statement is FALSE
The previous statement is TRUE.

blokey

#37
Yeah I am running RC2
It has taken me a while but I have achieved this,,,,,

I have posted my index template as suggested,, so i may be able to achieve an inline group of flags.
SMF Version 2.0 RC2     Server Info Apache version 2.0.63 PHP version 5.2.9 MySQL version 5.0.81-community Architecture x86_64 Operating system Linux

Sabre™

In your index.css, search for this
div#upper_section div.user {
float:left;
overflow:auto;
width:50%;
}


and change the width percentage to 55
div#upper_section div.user {
float:left;
overflow:auto;
width:55%;
}
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


blokey

SMF Version 2.0 RC2     Server Info Apache version 2.0.63 PHP version 5.2.9 MySQL version 5.0.81-community Architecture x86_64 Operating system Linux

blokey

I moved the flags above the shrink button


any chance you can give me the changes i have 2 do for this

also can i move my search box up there 2
SMF Version 2.0 RC2     Server Info Apache version 2.0.63 PHP version 5.2.9 MySQL version 5.0.81-community Architecture x86_64 Operating system Linux

SteveW

I have added a Welsh to English flag. I had to harcode this in though as it wouldn't convert non-english text as follows:

<a href="http://translate.google.com/translate?hl=en&amp;sl=cy&amp;tl=en&amp;u=', $scripturl, '?topic=', $context['current_topic'], '.0.html" title="Welsh to English" target="_blank"><img src="', $settings['default_theme_url'], '/images/gtflags/wales.png" alt="[WA]" style="border:none;" /></a>

Watch the skies!!

nend

Well, this is a old mod.

I am still waiting on my mod to be approved which will have language translation with rev17 which is already built but is still in testing. However rev16 is submitted here though and waiting approval.

But here is a real simple language translation to add to your site. Real simple to install, just edit the template or if you have a portal put it in a block. Plus it also works for quest and logged in users.

http://www.google.com/webelements/translate/

Also a live example can be found at http://www.2-si.net/ . Just look at the chat bar at the bottom of the page, it will have language translation.

lasatalayas

A friend has it on this site and it works perfectly.
I installed it on my site and whenever a button is pressed it goes to a Google Translate page in the new language but at the Forum Login and not with the page translated!
Why?

Ken.

wakewatcher

I am working on a smf forum site for our Mexico Condo association.  We speak English and Spanish.  Do I understand correctly that this will not allow Spanish to English Translation?  If so any suggestions?
smf 2.0.18

wakewatcher

Quote from: nend on May 04, 2010, 10:42:36 AM
Real simple to install, just edit the template or if you have a portal put it in a block. Plus it also works for quest and logged in users.

http://www.google.com/webelements/translate/


Could you be more specific on how to install this with smf 2RC3.  I like it that you can translate to English.
smf 2.0.18

Sabre™

You could also try [THIS] mod.
It does as you ask.
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


wakewatcher

I ended up putting the following just after the global declarations in template_main() in Display.template.php and it seems to work fine.  I only needed Spanish and English.  In order for it to work the way I wanted it I needed to claim that the original language was something other then Spanish or English.

Quote<div id="google_translate_element"></div><script>
function googleTranslateElementInit() {
  new google.translate.TranslateElement({
    pageLanguage: 'af',
    includedLanguages: 'en,es'
  }, 'google_translate_element');
}
</script><script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
smf 2.0.18

Burke ♞ Knight

#48
This mod has been updated for SMF 2.0.5 with some changes:

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)





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.

Advertisement: