Pligg CMS Forums


Go Back   Pligg CMS Forum > Pligg Development > Modification Tutorials



New Mod :Instant Language Translation

Advanced Tutorials for Modifying your Pligg site


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-14-2007, 05:07 PM
chuckroast's Avatar
Coder/Designer
Pligg Version: 1.0
Pligg Template: Shredit
 
Join Date: Jun 2006
Location: PA
Posts: 3,391
New Mod :Instant Language Translation

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, 497 views)
File Type: zip pligg_translate_mod.zip (4.9 KB, 69 views)


Thank this developer

Get the Pligg 1.0 Module Pack and more ---> download here





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

I added a .ZIP (even though RAR is bestest)

- Ash
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: 847
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
Coder/Designer
Pligg Version: 1.0
Pligg Template: Shredit
 
Join Date: Jun 2006
Location: PA
Posts: 3,391
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


Thank this developer

Get the Pligg 1.0 Module Pack and more ---> download here





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: 847
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: 847
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: 847
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
How to change language with language pack? zuperman General Help 4 12-06-2008 09:41 AM
Tag localization for your NON-ENGLISH language (searching) AnAlienHolakres3 Modification Tutorials 12 09-11-2008 09:37 AM
How to install a new language. sabater_wb Installation and Upgrade Help 1 08-17-2008 11:56 PM
dual language pligg? click a flag to change language maybe? mmotp General Help 12 06-27-2008 10:23 PM
Language variables reverted to defaults ! revolver General Help 3 11-10-2006 03:56 PM

Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Use the coupon code PLIGG at Dreamhost.com to receive a discount of up to $84.00 Make a donation to support Pligg CMS development