New Mod :Instant Language Translation

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-14-2007, 05:07 PM
chuckroast's Avatar
Pligg Developer/Coder/Designer
Pligg Version: SVN
Pligg Template: Galleria
 
Join Date: Jun 2006
Posts: 3,832
This little script/hack will allow readers from other countries to read the submitted story in their own language.

This means a site owner can now gain new audiences.

It currently translates the following.

English to Spanish
English to German
English to Russian
English to Italian
English to French
English to Chinese


If you like this module please consider making a donation to the author. (that's me!)



--------Installation instructions.. ---------

Download and unpack the files.
Upload the images contained in the images folder to your template/images folder.
Open link_summary.tpl in your templates folder and add the included code in translate.txt to the bottom of link_summary.tpl (copy and paste)
Save your addition to link_summary.tpl and upload it back to yor server.
Done!

If you would like a customized language translation script. The cost is $20.00 Private MSG me for details.

ENJOY!
Attached Files
File Type: rar pligg_translate_mod.rar (4.3 KB, 512 views)
File Type: zip pligg_translate_mod.zip (4.9 KB, 80 views)


Download the full Pligg Module Pack






Last edited by AshDigg; 04-14-2007 at 05:29 PM.
Reply With Quote
  #2 (permalink)  
Old 04-14-2007, 05:30 PM
AshDigg's Avatar
Mayor of PliggVille/Coder
 
Join Date: Dec 2005
Posts: 1,515
Very cool. Do you have a demo site?

I added a .ZIP (even though RAR is bestest)
Reply With Quote
  #3 (permalink)  
Old 04-14-2007, 06:29 PM
Banned
Pligg Version: 9.8.
Pligg Template: Custom
 
Join Date: Feb 2007
Location: Canada
Posts: 796
Is there a similar mod to translate your entire pligg site with one click?

Geoserv
Reply With Quote
  #4 (permalink)  
Old 04-14-2007, 06:37 PM
chuckroast's Avatar
Pligg Developer/Coder/Designer
Pligg Version: SVN
Pligg Template: Galleria
 
Join Date: Jun 2006
Posts: 3,832
Quote:
Is there a similar mod to translate your entire pligg site with one click?

Actually you could removes all {$story_url} from the code and paste it all into your sidebar.tpl


Download the full Pligg Module Pack






Last edited by chuckroast; 04-14-2007 at 06:57 PM.
Reply With Quote
  #5 (permalink)  
Old 04-14-2007, 09:24 PM
Banned
Pligg Version: 9.8.
Pligg Template: Custom
 
Join Date: Feb 2007
Location: Canada
Posts: 796
Perfect works like a charm.

Heres the code I used to get the translation go sitewide:

Quote:
<font size="1">Translate:&nbsp;
<a href="http://translate.google.com/translate?u={$my_base_url}&langpair=en|es&hl=en&ie =UTF-8&oe=UTF-8&prev=/language_tools">
<img src="{$my_pligg_base}/templates/{$the_template}/images/spanish.png" align="absmiddle"></a> <a

href="http://translate.google.com/translate?u={$my_base_url}&langpair=en|es&hl=en&ie =UTF-8&oe=UTF-8&prev=/language_tools">Spa

nish</a> |
<a

href="http://translate.google.com/translate?u={$my_base_url}&langpair=en%7Cde&hl=en& ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools"

><img src="{$my_pligg_base}/templates/{$the_template}/images/german.png" align="absmiddle"><a/> <a

href="http://translate.google.com/translate?u={$my_base_url}&langpair=en%7Cde&hl=en& ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools"

>German</a> |
<a

href="http://translate.google.com/translate?u={$my_base_url}&langpair=en%7Cru&hl=en& ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools"

><img src="{$my_pligg_base}/templates/{$the_template}/images/russian.png" align="absmiddle"><a/> <a

href="http://translate.google.com/translate?u={$my_base_url}&langpair=en%7Cru&hl=en& ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools"

>Russian</a> |
<a

href="http://translate.google.com/translate?u={$my_base_url}&langpair=en%7Cit&hl=en& ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools"

><img src="{$my_pligg_base}/templates/{$the_template}/images/itialian.png" align="absmiddle"></a> <a

href="http://translate.google.com/translate?u={$my_base_url}&langpair=en%7Cit&hl=en& ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools"

>Italian </a> |
<a

href="http://translate.google.com/translate?u={$my_base_url}&langpair=en%7Cfr&hl=en& ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools"

><img src="{$my_pligg_base}/templates/{$the_template}/images/french.png" align="absmiddle"></a> <a

href="http://translate.google.com/translate?u={$my_base_url}&langpair=en%7Cfr&hl=en& ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools"

>French</a> |
<a

href="http://translate.google.com/translate?u={$my_base_url}&langpair=en%7Czh-TW&hl=en&ie=UTF-8&oe=UTF-8&prev=%2Flanguage_too

ls"><img src="{$my_pligg_base}/templates/{$the_template}/images/chinese.png" align="absmiddle"></a> <a

href="http://translate.google.com/translate?u={$my_base_url}&langpair=en%7Czh-TW&hl=en&ie=UTF-8&oe=UTF-8&prev=%2Flanguage_too

ls">Chinese</a> |</p></font>
Thanks for the mod.

Working sample of sitewide translation with links in sidebar:

http://www.newsdots.com

Geoserv
Reply With Quote
  #6 (permalink)  
Old 04-14-2007, 09:25 PM
Banned
Pligg Version: 9.8.
Pligg Template: Custom
 
Join Date: Feb 2007
Location: Canada
Posts: 796
Any idea how to make it to when it gets translated, the Google Frame gets automatically broken, its an option you have currently after it is translated.

Geoserv.
Reply With Quote
  #7 (permalink)  
Old 04-14-2007, 09:29 PM
Banned
Pligg Version: 9.8.
Pligg Template: Custom
 
Join Date: Feb 2007
Location: Canada
Posts: 796
I noticed that when it translates, the main navigation gets translated to either the pligg name value or something.

It takes:

Quote:
<li id="navhome"><a href="{$my_base_url}{$my_pligg_base}" class="main"><span>{#PLIGG_Visual_Home#}</span><p style="font-size:10px; padding: 5px:">Spot the Dots</p></a></li>
My pligg base is News Dots, and translates into "Home", how can I fix the code so it actually trranslates News Dots? It doesn't translate "Spot the Dots" at all.


I figured out the part about translating in to home, I somehow changed the pligg value, but it still doesn't trrnaslate the "Spot the Dots" part.

Geoserv.

Last edited by Geoserv; 04-14-2007 at 09:37 PM.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
dual language pligg? click a flag to change language maybe? mmotp Questions and Comments 17 02-15-2010 08:05 PM
PliggMo by nadia - Fully support UTF8 language (Thai) ♥ไทยจ้า♥ Techkr Questions and Comments 6 06-20-2009 10:25 AM
Problem with translation to czech language due to special characters. stormanx Questions and Comments 6 05-04-2009 10:04 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development