Advertisement:

Author Topic: Quick Translation  (Read 58786 times)

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,483
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • Russian translations for SMF mods
Quick Translation
« on: October 17, 2010, 12:55:02 PM »
Link to Mod

The modification can be used to translate messages in all languages provided by the Google Translator Toolkit.

How this works? When browser's preferrable language doesn't match with user's language (on forum) then such users can see a special "translate" button, on button panel.

This mod needs PHP 5.3 or greater. It uses pear package Text_LanguageDetect that can identify 52 human languages from post message.

Doesn't work? Just install New Hooks package!

Russian Support | Donate

This work is licensed under a BSD
« Last Edit: December 10, 2011, 09:17:27 AM by Bugo »

Offline Masterd

  • SMF Hero
  • ******
  • Posts: 3,895
  • Gender: Male
Re: Quick Translation
« Reply #1 on: October 17, 2010, 01:09:28 PM »
Nice mod! :D

Offline -=[Vyorel]=-

  • Sr. Member
  • ****
  • Posts: 743
  • Gender: Male
  • Web Hoster
    • RomanianPowerHosting on Facebook
    • Romanian Power Hosting
Re: Quick Translation
« Reply #2 on: October 17, 2010, 02:55:39 PM »
Cool!

Nice mod! :D
No. It's very nice! ;)
My mods for SMF - [6].

Offline iPhoneDestek

  • Jr. Member
  • **
  • Posts: 200
  • Gender: Male
  • MOD Translator from iPhoneDestek.org
    • iPhoenDestek
Re: Quick Translation
« Reply #3 on: October 17, 2010, 03:13:54 PM »
Translation by MOD Translator SirtLanVadisi in turkish and turkish-utf8 languages




Code: [Select]

<file name="$themedir/languages/Modifications.turkish.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// Quick Translation MOD  by SirtLanVadisi.NeT
$txt['quick_trans_not_found'] = 'Üzgünüm, çeviri bulunamamıştır...';
$txt['quick_trans_want_translate'] = 'Bir mesaj çevirmek istiyormusunuz ?';
$txt['quick_trans_select_lang'] = 'Dil seçiniz ';
// End Quick Translation MOD  by SirtLanVadisi.NeT
]]></add>
</operation>
</file>
<file name="$themedir/languages/Modifications.turkish-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// Quick Translation MOD  by SirtLanVadisi.NeT
$txt['quick_trans_not_found'] = 'Üzgünüm, çeviri bulunamamıştır...';
$txt['quick_trans_want_translate'] = 'Bir mesaj çevirmek istiyormusunuz ?';
$txt['quick_trans_select_lang'] = 'Dil seçiniz ';
// End Quick Translation MOD  by SirtLanVadisi.NeT
]]></add>
</operation>
</file>



Translation by MOD Translator SirtLanVadisi in german and german-utf8 languages




Code: [Select]

<file name="$themedir/languages/Modifications.german.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// Quick Translation MOD  by SirtLanVadisi.NeT
$txt['quick_trans_not_found'] = 'Leider, es konnte keine Übersetzung gefunden werden...';
$txt['quick_trans_want_translate'] = 'Wollen Sie eine Nachricht übersetzen ?';
$txt['quick_trans_select_lang'] = 'Wählen Sie eine Sprache aus';
// End Quick Translation MOD  by SirtLanVadisi.NeT
]]></add>
</operation>
</file>
<file name="$themedir/languages/Modifications.german-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// Quick Translation MOD  by SirtLanVadisi.NeT
$txt['quick_trans_not_found'] = 'Leider, es konnte keine Übersetzung gefunden werden...';
$txt['quick_trans_want_translate'] = 'Wollen Sie eine Nachricht übersetzen ?';
$txt['quick_trans_select_lang'] = 'Wählen Sie eine Sprache aus ';
// End Quick Translation MOD  by SirtLanVadisi.NeT
]]></add>
</operation>
</file>

« Last Edit: October 17, 2010, 03:22:49 PM by ®SirtLan »

$$  Q u a l i t y    I n f o r m a t i o n    L i n e  for iPhone $$



<   M O D  |  T R A N S L A T O R  |  TO  |  TUR  |  A N D   |  G E R   >


Offline .ABM.

  • SMF Hero
  • ******
  • Posts: 1,950
  • Gender: Male
  • C.A.B.J
Re: Quick Translation
« Reply #4 on: October 17, 2010, 10:59:42 PM »
Nice mod!

Offline Qayyom Ashraf

  • Jr. Member
  • **
  • Posts: 141
  • Gender: Male
  • Qayyom Ashraf
    • JangForum - Pakistan
Re: Quick Translation
« Reply #5 on: October 18, 2010, 01:35:48 AM »
Successfully Installed (without any error).

But 'Translate' button didn't appeared any where in the message body, how could be configured?
Qayyom Ashraf  |  Karachi-PK |::.www.JangForum.Com.::|

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,483
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • Russian translations for SMF mods
Re: Quick Translation
« Reply #6 on: October 18, 2010, 02:31:54 AM »
No way. Maybe is a conflict with other scripts (prototype etc).

Offline Qayyom Ashraf

  • Jr. Member
  • **
  • Posts: 141
  • Gender: Male
  • Qayyom Ashraf
    • JangForum - Pakistan
Re: Quick Translation
« Reply #7 on: October 18, 2010, 03:28:06 AM »
No way. Maybe is a conflict with other scripts (prototype etc).

I Tried again, now it is working...

Thanks, this is really nice mod!
Qayyom Ashraf  |  Karachi-PK |::.www.JangForum.Com.::|

Offline Dzonny

  • Localizer
  • SMF Super Hero
  • *
  • Posts: 11,805
  • Gender: Male
  • No sleep...
    • dzontra.nikola on Facebook
    • Dzonny on GitHub
    • dzontranikola on LinkedIn
    • @opusteniforum on Twitter
    • Samo opusteno
Re: Quick Translation
« Reply #8 on: October 19, 2010, 01:54:52 PM »
Wo-hoo, nice one :)
Simple, elegant, powerfull, like smf :P
Really, i like it, and im gonna use it on my forum, i will just move translation button a little bit... :)


Offline KensonPlays

  • SMF Hero
  • ******
  • Posts: 4,306
    • @Kenson_Plays on Twitter
Re: Quick Translation
« Reply #10 on: October 20, 2010, 01:38:05 AM »
Sounds awesome ill install it on my test forum tomorrow morning

wiecher

  • Guest
Re: Quick Translation
« Reply #11 on: October 27, 2010, 08:25:02 AM »
Dutch translate don`t work ?

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,483
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • Russian translations for SMF mods

Offline nend

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,755
  • 2 deep n2 the code
    • sicommnend on GitHub
    • SIComm.us
Re: Quick Translation
« Reply #13 on: November 04, 2010, 12:14:53 AM »
Hi, Bugo. I was going to use this API in the past but the cap prevented me from doing what I wanted to do with it. I doubt the cap has been lifted though, 5 thousand characters right. The character limit however was only part of it, the response from Google was painfully slow also.  :(

Offline chilly

  • Jr. Member
  • **
  • Posts: 262
Re: Quick Translation
« Reply #14 on: November 04, 2010, 05:25:37 AM »
Translation by MOD Translator SirtLanVadisi in german and german-utf8 languages
Code: [Select]
<file name="$themedir/languages/Modifications.german.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// Quick Translation MOD  by SirtLanVadisi.NeT
$txt['quick_trans_not_found'] = 'Leider, es konnte keine Übersetzung gefunden werden...';
$txt['quick_trans_want_translate'] = 'Wollen Sie eine Nachricht übersetzen ?';
$txt['quick_trans_select_lang'] = 'Wählen Sie eine Sprache aus';
// End Quick Translation MOD  by SirtLanVadisi.NeT
]]></add>
</operation>
</file>
<file name="$themedir/languages/Modifications.german-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// Quick Translation MOD  by SirtLanVadisi.NeT
$txt['quick_trans_not_found'] = 'Leider, es konnte keine Übersetzung gefunden werden...';
$txt['quick_trans_want_translate'] = 'Wollen Sie eine Nachricht übersetzen ?';
$txt['quick_trans_select_lang'] = 'Wählen Sie eine Sprache aus ';
// End Quick Translation MOD  by SirtLanVadisi.NeT
]]></add>
</operation>
</file>


you used google to translate this? Looks like.
better use this one:
Code: [Select]
$txt['quick_trans_not_found'] = 'Es konnte leider keine Übersetzung gefunden werden.';
$txt['quick_trans_want_translate'] = 'Wollen Sie eine Nachricht übersetzen?';
$txt['quick_trans_select_lang'] = 'Sprache wählen ';//"Wählen Sie eine Sprache aus" is correct but this one too + it is shorter -> more room for other stuff

Language Coordinator

Offline soulgeek

  • Semi-Newbie
  • *
  • Posts: 78
    • Life Coaching
Re: Quick Translation
« Reply #15 on: November 06, 2010, 01:51:23 AM »
After installing this Mod on my rC 2.03, I see  nothing, no button called Translate..

how am i suppose to Enable it, where is the settings tab?
lets Grow Together With Law of Attraction !

Join to Seek a Better Like at
Law of Attraction Forum

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,483
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • Russian translations for SMF mods
Re: Quick Translation
« Reply #16 on: November 06, 2010, 02:25:09 AM »
No settings. See screenshot.

Offline Abavagada

  • Semi-Newbie
  • *
  • Posts: 72
Re: Quick Translation
« Reply #17 on: November 06, 2010, 11:46:15 AM »
For those who can't get it to work, it could be that the extra header info isn't being installed.
Look in Sources/Display.php for any

Code: [Select]
$context['html_headers']  = '
and replace it with

Code: [Select]
$context['html_headers']  .= '
Without the dot, it is overwriting this mods extra header data.
That's where I had a conflict with a mod.



Offline qtime

  • Full Member
  • ***
  • Posts: 501
Re: Quick Translation
« Reply #18 on: November 10, 2010, 11:00:55 AM »
it's working great at 1.1.12 smf, great option!

Offline _pi

  • Semi-Newbie
  • *
  • Posts: 82
Re: Quick Translation
« Reply #19 on: November 10, 2010, 04:32:56 PM »
nice idea, but it needs to remember last language choice, because having to select translation language again and again is not convenient.

maybe store that info in cookie?
SMF Cookie Format

but much respect for that approach, good work!
« Last Edit: November 10, 2010, 04:37:34 PM by _pi »