• [MOD] Google AJAX Translation / Without Page reload 5 0 5 1
Currently:  

Author Topic: [MOD] Google AJAX Translation / Without Page reload  (Read 52225 times)

0 Members and 1 Guest are viewing this topic.

Offline moto1985

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: [MOD] Google AJAX Translation / Without Page reload
« Reply #15 on: March 27, 2009, 12:43:02 AM »
kann man diesen mod auch für eine Komplette seite verwenden?
oder nur für Kommentare?

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Google AJAX Translation / Without Page reload
« Reply #16 on: March 27, 2009, 01:29:55 AM »
@ moto1985

1. vom Standard her ist das Script für die Übersetzung von max. 500 Zeichen ausgelegt ...
2. sämtliche html- / bb-Formatierungen zwischen <div id="translate_comment_{comment_id}"> und </div> gehen mit der Übersetzung verloren ...
   
... ergo ...
... damit eignet sich das Script tatsächlich nur für Kommentare / Beschreibungen / Statements innerhalb einer html-Formatierung (z.B. einer Tabellenzelle) ...
... bei einer kompletten Seite siehst du nach der Übersetzung nur noch unformatierten Text, ohne Bilder, Tabellen u.d.gl. ...
« Last Edit: March 27, 2009, 09:46:46 AM by mawenzi »
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: [MOD] Google AJAX Translation / Without Page reload
« Reply #17 on: April 01, 2009, 01:17:50 PM »
Is it possible to get this mod to work for image description?
As long as I can finish my site before I die.

Offline AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: [MOD] Google AJAX Translation / Without Page reload
« Reply #18 on: April 01, 2009, 01:22:48 PM »
HAs anyone gotten this to work together with ajax show comments without page reload/ comments rating mod?
As long as I can finish my site before I die.

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Google AJAX Translation / Without Page reload
« Reply #19 on: April 01, 2009, 01:31:29 PM »
... the Google translation works also for image description if it is no longer than 500 characters ...
... you can also test it with e.g. 1000 characters ... then replace all "500" with "1000" in the javascript ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: [MOD] Google AJAX Translation / Without Page reload
« Reply #20 on: April 01, 2009, 02:55:39 PM »
Ok, I will try it.... but how to change the variables in the Javascript to make it work with

{image_description}
and {image_keywords} ?


I know these things must be changed :

 var original_posts = new Array();
    var original_comments = new Array();

And some others I think... but I dont know how to change them.. what to change them to.



If this mod could be made to work with V@nos multiple Language MOD (version b) that would even be super cool. If not it is ok to see the little flags by the keywords and image description.

I can say this mod DOES Work with the Ajax image comment/rating mod...
As long as I can finish my site before I die.

Offline AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: [MOD] Google AJAX Translation / Without Page reload
« Reply #21 on: April 01, 2009, 03:05:09 PM »
After following the directions to try to get this to work with latest comments on front page mod by V@no... I can say it does not work when adding the code to the last_comment.html template......

I will post to that thread to ask for help......
As long as I can finish my site before I die.

Offline bergblume

  • Sr. Member
  • ****
  • Posts: 463
  • on to the top!
    • View Profile
Re: [MOD] Google AJAX Translation / Without Page reload
« Reply #22 on: July 09, 2009, 09:30:55 AM »
... the Google translation works also for image description if it is no longer than 500 characters ...
... you can also test it with e.g. 1000 characters ... then replace all "500" with "1000" in the javascript ...

hi mawenzi,

can you pls. give me a detailed explanation how to get it worl with image description --- which files how to modify?

thank you, bergblume

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Google AJAX Translation / Without Page reload
« Reply #23 on: July 16, 2009, 07:50:36 PM »
@bergblume

... in details.html verwende statt ...
Code: [Select]
{image_description}

... nun dieses ...
Code: [Select]
<div id="translate_comment_{image_id}">{image_description}</div><br>
<div align="right"><small>Bild-Beschreibung in: <a href="javascript:google_translate('en','comment','{image_id}');" title="Description in English">
<img src="{template_url}/images/gb.gif" border="0"></a>&nbsp;<a href="javascript:google_translate('de','comment','{image_id}');" title="Beschreibung in Deutsch">
<img src="{template_url}/images/de.gif" border="0"></a>&nbsp;<a href="javascript:google_translate('fr','comment','{image_id}');" title="Description en Français">
<img src="{template_url}/images/fr.gif" border="0"></a></div>

... vorausgesetzt, dass die Modifikation bereits für die Kommentare installiert ist, so braucht das J-Script nicht nochmals eingebunden werden ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

rinaldos

  • Guest
Re: [MOD] Google AJAX Translation / Without Page reload
« Reply #24 on: July 16, 2009, 09:52:53 PM »
@mawenzi,
das war ja einfach :-) KLappt wunderbar. Danke dir für das Addon :-)

LG
Ingo

Offline Frank Götze

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Photography Portal Galerie
Re: [MOD] Google AJAX Translation / Without Page reload
« Reply #25 on: November 09, 2009, 08:59:02 AM »
Danke für den MOD Lucifix,

@mawenzi & rinaldos,

das klappt ja wunderbar mit der Description. Um die Sache abzurunden fehlen nun noch aus meiner Sicht zwei Varianten. Die Umsetzung für deinen [MOD] All Comments (Alle Kommentare) V.1.6 und für den [MOD] Last comments v1.2.0 . Hier habe ich ein Problem mit der Image ID für den jeweiligen Kommentar. :oops: Habt ihr dafür einen Ansatz? Zumindest habe ich es auf euren Seiten gesehen, also müsste es ja da auch gehen.

VG Frank.

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Google AJAX Translation / Without Page reload
« Reply #26 on: November 09, 2009, 08:00:35 PM »
Hallo Frank,

... du brauchst für die Zuweisung immer eine Eindeutige ID und die kann bei den Kommentaren nicht die image_id sein ... logisch, denk ich ...
... bei den jeweiligen Kommentar-Listen verwende ich also zur Auswahl des Kommentars nicht die image_id, sondern die comment_id ...
... das sieht dann für [MOD] All Comments (Alle Kommentare) V.1.6 in der comments_all_bit.html z.B. wie folgt aus ...

Code: [Select]
<div id="translate_comment_{comment_id}">{comment_text}</div>
<div align="right"><small>Kommentar in: <a href="javascript:google_translate('en','comment',{comment_id});" title="Comment in English">English</a>
<a href="javascript:google_translate('de','comment',{comment_id});" title="Kommentrar in Deutsch">Deutsch</a>
<a href="javascript:google_translate('fr','comment',{comment_id});" title="Commentaires en Français">French</a>

... in der comments_all.php finde ...
Code: [Select]
"total_image_comments" => $total_image_comments,
... und füge dahinter noch ein ...
Code: [Select]
"comment_id" => $comment_row[$i]['comment_id'],

... bei Erfolg bitte kurzes Statement ... danke ...
« Last Edit: November 09, 2009, 10:26:01 PM by mawenzi »
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Frank Götze

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Photography Portal Galerie
Re: [MOD] Google AJAX Translation / Without Page reload
« Reply #27 on: November 09, 2009, 10:55:29 PM »
Guten Abend mawenzi,

danke für die Hilfestellung!  :thumbup:  Jetzt funktioniert der MOD ebenfalls ohne Beanstandungen in deinem  [MOD] All Comments (Alle Kommentare) V.1.6 .

LG Frank.

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: [MOD] Google AJAX Translation / Without Page reload
« Reply #28 on: August 29, 2010, 05:18:10 PM »
How do i add new langauges. Ive tried Vanos ways of just editing step 2 but for example if i want danish then all i change is the fr to dn but it wont work.

pleasee thank u guys

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)