JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 2nd, 2012, 05:14 AM
Ace... Ace... is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Location: France
Posts: 5 Ace... User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 22 m 35 sec
Reputation Power: 0
Other - Access Google translated text as a variable

Primarily need to understand how to manipulate the displayed translated text, using javascript, in order to convert it to usable text.

I'm creating a 3 box translation system: source text-->translated text-->source language

This will allow English to be entered. The French translation (next to it). The French translated back into English (next to it).

This would be the ultimate google translator as the writer could check his French (any) translation by reading it in English (as he types it!!); avoiding stupid translation errors.

BTW this works well as a concept, but is extremely laborious, involving copy and paste across 2 tabs for every change made (ie. not as it is typed).

This could be done any way, to get the end result.

I'm currently developing it with 3 iframes, using the function below (onclick), to store the source text.

Code:
var pg_1 = document.getElementById("textarea_id").value;
localStorage.pg_1_text=pg_1;


And this script to write it into page 2, where it will be auto-translated.

Code:
document.getElementById("result").innerHTML="<pre>" + localStorage.pg_1_text + "</pre>";


I now need to get the translated displayed text written into page 3.

Evidently I can drag the mouse across the text, copy and paste into page 3. However, an onclick system would be better. Write a paragraph, click on each page, view the results..... that'd be fine.

My problem is that I don't know how this 'displayed text' is referenced. But however it is, the priority is to get the displayed text into page 3.

(Note: I have had a read of similar threads and none seem to be applicable)

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Other - Access Google translated text as a variable

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap