Using Google Translate to automate text translation

Post your working scripts, libraries and tools for AHK v1.1 and older
teadrinker
Posts: 4309
Joined: 29 Mar 2015, 09:41
Contact:

Re: Using Google Translate to automate text translation

27 Feb 2020, 07:25

r2997790

Code: Select all

res := GoogleTranslate("今日",, "en")
MsgBox, % res
MsgBox, % RegExReplace(res, "s)\R\+.+")
garry
Posts: 3740
Joined: 22 Dec 2013, 12:50

Re: Using Google Translate to automate text translation

27 Feb 2020, 15:06

EDIT : sorry teadrinker I was to late with answer ... it's your script
Is it possible to set 'detect language' for the input language?
example above ( garry , just added a GUI ) , translates x-language to selected language ( with dropdownlist )
UnReALiTyy
Posts: 223
Joined: 06 Jun 2017, 11:38

Re: Using Google Translate to automate text translation

29 Feb 2020, 14:48

garry wrote:
27 Feb 2020, 15:06
Is it possible to set 'detect language' for the input language?
@garry I would also be interested in how this works and whether it would be possible.
I've been working on a script for several months, but I still lack this function.
Last edited by UnReALiTyy on 29 Feb 2020, 17:30, edited 2 times in total.
User avatar
rommmcek
Posts: 1470
Joined: 15 Aug 2014, 15:18

Re: Using Google Translate to automate text translation

29 Feb 2020, 16:04

Der zweite Parameter ist standardmäßig "auto". Das heißt, die Eingabesprache wird automatisch erkannt.
UnReALiTyy
Posts: 223
Joined: 06 Jun 2017, 11:38

Re: Using Google Translate to automate text translation

29 Feb 2020, 16:34

@rommmcek ja das ist mir schon bewusst, aber wie sollte mir das helfen? Deshalb weiß ich ja trotzdem nicht welche Sprache erkannt wurde. Es kommt auch mal vor das Google die falsche Sprache erkennt, wenn man also die erkannte Sprache sehen würde, wüsste man weshalb bzw. das die Übersetzung nicht hinhaut.

@rommmcek yes I am aware of that, but how should it help me? That's why I still don't know which language was recognized. It also happens that Google recognizes the wrong language, so if you saw the recognized language, you would know why or that the translation would not work.

@gregster I'm sorry, I forgot about it :oops:
Last edited by UnReALiTyy on 29 Feb 2020, 17:34, edited 3 times in total.
gregster
Posts: 8921
Joined: 30 Sep 2013, 06:48

Re: Using Google Translate to automate text translation

29 Feb 2020, 17:06

Guys, I know this is about automated translations, but it's still the english language section of the forums :wave: .

Edit: Danke!
No problem, just wanted to remind you.
User avatar
rommmcek
Posts: 1470
Joined: 15 Aug 2014, 15:18

Re: Using Google Translate to automate text translation

29 Feb 2020, 18:33

@gregster: Sorry for violating English forum.
@UnReALiTyy: Sorry for not understanding your question correctly. The script in this thread is very good, but
Spoiler
Edit: Below is modified teadrinker's JSON code to retrieve detected language (trice - independently, because don't know which one is right. There was one more, but not consistant so I dropped it out)
Edit2: It seems that the first displayed language is referring to the declared language (the one user declared as source language - if there is no declaration then it is the same as next two). Other two seem to be always the same and reflect Google Translate detection.
Edit3: The one more that was not consistant seems to be a pair. And reflects interim translations. I.e. I think Google Translate don't use direct translations always, but for not supported direct translations, translates first to English (didn't noticed other interim language yet) and then from English to the desired language.
Edit4: Updated the script to give maximal feedback about detected language.
Spoiler
Last edited by rommmcek on 02 Mar 2020, 11:33, edited 2 times in total.
garry
Posts: 3740
Joined: 22 Dec 2013, 12:50

Re: Using Google Translate to automate text translation

01 Mar 2020, 08:00

UnReaLiTyy
@garry I would also be interested in how this works and whether it would be possible.
I've been working on a script for several months, but I still lack this function.
Don't know why , worked for me ( auto chinese detected >> to russian ( with dropdownlist is russian selected ) )
谢谢 >>> Спасибо
UnReALiTyy
Posts: 223
Joined: 06 Jun 2017, 11:38

Re: Using Google Translate to automate text translation

01 Mar 2020, 15:50

@garry yes I got it now thanks to @rommmcek his example, thanks for that.

I have now rewritten it to bring something. Only I find this really really complicated, it took me a few hours.
how can i simplify my example?

Code: Select all

#SingleInstance, force
#NoEnv
SendMode Input
language:
e5x=
(Ltrim join|
nl_Nederlands
af_Suid-Afrika
fy_Fryslân
eu_Basque
ca_Catalan
de_Deutsch
da_Dansk
sv_Sverige
no_Norge
is_Iceland
fi_Suomen
en_English
pt_Portugues
es_Español
it_Italia
fr_Français
ru_Rossija
zh-CN_Chinese
ja_Nippon
ko_Korea
ro_Romania
bg_Bulgaria
mc_Macedonia
el_Greek
tr_Turkiye
sq_Albania
hr_Croatia
sr_Serbia
sl_Slovenia
hu_Hungary
cs_Czech
sk_Slovakia
pl_Poland
be_Belarus
uk_Ukraina
et_Estonia
lv_Latvija
lt_Lituania
az_Azerbaijan 
ka_Georgian
ar_Arabic
iw_Hebrew
hi_Hindi
id_Indonesia
ms_Malaysia
vi_Vietnam
th_Thai
ta_Tamil
ur_Urdu
sw_Swahili
bn_Bengal
%s%
)

;Chinese = 今天天气很好
;English = Hello,World!
;Japanisch = 今日
;Portugues = morcego
;Español = murciélago
;Russisch = Привет мир

Gui, Add, Edit, y40 x5 w120 vedt1, % clipboard
Gui, Add, Edit, y40 x150 w120 vedt2, % GoogleTranslate(clipboard)
Gui, Add, DDL, y10 x150 vDDL1, %e5x%
GuiControl, Choose, DDL1, de
Gui, Submit, nohide

test3 := InStr(edt2, ",")
test := SubStr(edt2,1,test3 -1)
test := InStr(e5x, test .= "_")
test2 := SubStr(e5x,test)
test := InStr(test2, "|")
test2 := SubStr(test2,1,test -1)

GuiControl, Text, edt2, % SubStr(edt2,test3 +1)
Gui, Add, Text, y10 x5 cBlue, From: %test2%
Gui, 1:Show, x650
return

GoogleTranslate(str, from := "auto", to := "de")  {
   static JS := CreateScriptObj(), _ := JS.( GetJScript() ) := JS.("delete ActiveXObject; delete GetObject;")
   
   json := SendRequest(JS, str, to, from, proxy := "")    
   oJSON := JS.("(" . json . ")")

   if !IsObject(oJSON[1])  {
      Loop % oJSON[0].length
         ;trans .= oJSON[0][A_Index - 1][0] ; original
         trans .= oJSON[0][A_Index - 1][0] ; by RRR
         trans := oJSON[2] "," trans ; by RRR
   }
   else  {
      ;MainTransText := oJSON[0][0][0] ; orginal
      MainTransText := oJSON[2] "," oJSON[0][0][0] ; by RRR
      Loop % oJSON[1].length  {
         trans .= "`n+"
         obj := oJSON[1][A_Index-1][1]
         Loop % obj.length  {
            txt := obj[A_Index - 1]
            trans .= (MainTransText = txt ? "" : "`n" txt)
         }
      }
   }
   if !IsObject(oJSON[1])
      MainTransText := trans := Trim(trans, ",+`n ")
   else
      trans := MainTransText . "`n+`n" . Trim(trans, ",+`n ")

   from := oJSON[2]
   trans := Trim(trans, ",+`n ")
   Return trans
}

SendRequest(JS, str, tl, sl, proxy) {
   ComObjError(false)
   http := ComObjCreate("WinHttp.WinHttpRequest.5.1")
   ( proxy && http.SetProxy(2, proxy) )
   http.open( "POST", "https://translate.google.com/translate_a/single?client=webapp&sl="
      . sl . "&tl=" . tl . "&hl=" . tl
      . "&dt=at&dt=bd&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&dt=t&ie=UTF-8&oe=UTF-8&otf=0&ssel=0&tsel=0&pc=1&kc=1"
      . "&tk=" . JS.("tk").(str), 1 )

   http.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8")
   http.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0")
   http.send("q=" . URIEncode(str))
   http.WaitForResponse(-1)
   Return http.responsetext
}

URIEncode(str, encoding := "UTF-8")  {
   VarSetCapacity(var, StrPut(str, encoding))
   StrPut(str, &var, encoding)

   While code := NumGet(Var, A_Index - 1, "UChar")  {
      bool := (code > 0x7F || code < 0x30 || code = 0x3D)
      UrlStr .= bool ? "%" . Format("{:02X}", code) : Chr(code)
   }
   Return UrlStr
}

GetJScript()
{
   script =
   (
      var TKK = ((function() {
        var a = 561666268;
        var b = 1526272306;
        return 406398 + '.' + (a + b);
      })());

      function b(a, b) {
        for (var d = 0; d < b.length - 2; d += 3) {
            var c = b.charAt(d + 2),
                c = "a" <= c ? c.charCodeAt(0) - 87 : Number(c),
                c = "+" == b.charAt(d + 1) ? a >>> c : a << c;
            a = "+" == b.charAt(d) ? a + c & 4294967295 : a ^ c
        }
        return a
      }

      function tk(a) {
          for (var e = TKK.split("."), h = Number(e[0]) || 0, g = [], d = 0, f = 0; f < a.length; f++) {
              var c = a.charCodeAt(f);
              128 > c ? g[d++] = c : (2048 > c ? g[d++] = c >> 6 | 192 : (55296 == (c & 64512) && f + 1 < a.length && 56320 == (a.charCodeAt(f + 1) & 64512) ?
              (c = 65536 + ((c & 1023) << 10) + (a.charCodeAt(++f) & 1023), g[d++] = c >> 18 | 240,
              g[d++] = c >> 12 & 63 | 128) : g[d++] = c >> 12 | 224, g[d++] = c >> 6 & 63 | 128), g[d++] = c & 63 | 128)
          }
          a = h;
          for (d = 0; d < g.length; d++) a += g[d], a = b(a, "+-a^+6");
          a = b(a, "+-3^+b+-f");
          a ^= Number(e[1]) || 0;
          0 > a && (a = (a & 2147483647) + 2147483648);
          a `%= 1E6;
          return a.toString() + "." + (a ^ h)
      }
   )
   Return script
}

CreateScriptObj() {
   static doc
   doc := ComObjCreate("htmlfile")
   doc.write("<meta http-equiv='X-UA-Compatible' content='IE=9'>")
   Return ObjBindMethod(doc.parentWindow, "eval")
}
garry
Posts: 3740
Joined: 22 Dec 2013, 12:50

Re: Using Google Translate to automate text translation

01 Mar 2020, 16:57

script from teadrinker , added GUI / DropDownList
see at page-1
Last edited by garry on 02 Mar 2020, 13:05, edited 1 time in total.
UnReALiTyy
Posts: 223
Joined: 06 Jun 2017, 11:38

Re: Using Google Translate to automate text translation

02 Mar 2020, 00:58

garry wrote:
01 Mar 2020, 16:57
this is the script from teadrinker , added GUI / DropDownList

Code: Select all

;;-------- https://www.autohotkey.com/boards/viewtopic.php?f=76&t=71993 ---
;- translator from user teadrinker / with GUI 
/*
modified=20200130  translate clipboard again in other language with dropdownlist (ddl1)
modified=20200129  warn / translate when language change (ddl1) 
modified=20191019  ( teadrinker ) edited 1 time in total. 
modified=20190422  EDIT CreateScriptObj() ( teadrinker )
created =20190419
select language , copy marked text ctrl+c > see translation in selected language
*/
;-------------------------------------------------------------------------------
#NoEnv
;#Warn
setworkingdir,%a_scriptdir%
tl1:=""
Gui,1:default
Gui,1: +AlwaysOnTop  
Gui,1: -DPIScale
SS_REALSIZECONTROL := 0x40
wa:=a_screenwidth
ha:=a_screenheight
xx:=100
clipboard=
cl=
ex:=""
transform,s,chr,32
gosub,language
rssini=%a_scriptdir%\translate.ini
ifnotexist,%rssini%    ;- first run
    {
    translateto=pt     ;- portuguese
    IniWrite,%translateto%, %rssini% ,Lang1  ,key1
    }
Gui,1:Color,Black,Black
Gui, Font,s14 cYellow ,Lucida Console 
IniRead, tl1, %rssini%,Lang1 ,key1
global tl1,JS

x:=(wa*.5)/xx,W :=(wa*28)/xx,H :=(ha*10)/xx,y:=(ha*.5)/xx
Gui,add,dropdownlist, x%x% y%y% w%w% vDDL1 gddl2 ,%e5x%
W :=(wa*29)/xx , H :=(ha*88)/xx , y:=(ha*3.5)/xx
Gui,add,edit,x%x% y%y%  w%w% h%h% vED1  -border -E0x200,
W :=(wa*30)/xx , H :=(ha*92)/xx  , x:=(wa-w),y:=(ha*1)/xx
Gui, Show,x%x% y%y% w%w% h%h% ,TRANSLATE
GuiControl,1:Choose,ddl1,%tl1%
GuiControl, Focus,ED1
WinID := WinExist("A")
WinSetTitle, ahk_id %WinID%,, TRANSLATE_to_%tl1%
E0x200 = WS_EX_CLIENTEDGE
RETURN
;--------------------------
esc::exitapp
;--------------------------
Guiclose:
cl=
clipboard=
exitapp
/*
;------- Hotkey alt+F7 -------------------
!F7::
  send, ^c
  sleep,500
  clipwait,
  Gui, Show,
  GuiControl, Focus,ED1
 if (!ErrorLevel)
  {
  cl:=clipboard
  aa:=GoogleTranslate(cl)
  ControlSetText,edit1,%aa%, ahk_class AutoHotkeyGUI
  aa=
  ;cl=
  ;clipboard=
  GuiControl, Focus,ED1
  }
return
;--------------------------
*/
;-------------- OR : ------
;/*
;----- ( Hotkey) CTRL+C Clipboardchange ---------------------
OnClipboardChange:
If (A_EventInfo=1)
 {
 Gui, Show,
 GuiControl, Focus,ED1
 ClipWait,
 if (!ErrorLevel)
  {
  cl:=clipboard
  aa:=GoogleTranslate(cl)
  ControlSetText,edit1,%aa%, ahk_class AutoHotkeyGUI
  aa=
  ;cl=
  ;clipboard=
  GuiControl, Focus,ED1
  }
 }
return
;--------------------------
;*/
;--------------------------
ddl2:
Gui,1:submit,nohide
h1:=""
h2:=""
if DDL1<>
{
StringSplit,h,ddl1,`_
if h1<>
  {
  IniWrite,%h1%, %rssini% ,Lang1  ,key1
  tl1:=h1
  WinSetTitle, ahk_id %WinID%,, TRANSLATE_to_%h2%
  gosub,translateddlchange
  }
}
return
;----------------------------------------
;------- translate changed language -----
translateddlchange:
Guicontrolget,ed1
;stringreplace,ed1,ed1,`n,`r`n,all
if ed1<>
{
aa:=GoogleTranslate(cl)      ;- translate clipboard again in other language
;aa:=GoogleTranslate(ed1)     ;- translate EDIT            in other language
;ControlSetText,edit1,%aa%`r`n--------------------------`r`n%a2%, ahk_class AutoHotkeyGUI
ControlSetText,edit1,%aa%, ahk_class AutoHotkeyGUI
aa=
;a2=
}
return
;---------------------------------------
;;-------- https://www.autohotkey.com/boards/viewtopic.php?p=273621#p273621 ---
;- Last edited by teadrinker on Sat Oct 19, 2019 9:58 pm, edited 1 time in total. 
;MsgBox, % GoogleTranslate("今日の天気はとても良いです")
;MsgBox, % GoogleTranslate("Hello, World!", "en", "ru")
GoogleTranslate(str, from := "auto", to := "en")  {
   trans:=""
   static JS := CreateScriptObj(), _ := JS.( GetJScript() ) := JS.("delete ActiveXObject;delete GetObject;")
   json := SendRequest(JS, str, to, from, proxy := "")
   oJSON := JS.("(" . json . ")")
   if !IsObject(oJSON[1])  {
      Loop % oJSON[0].length
         trans .= oJSON[0][A_Index - 1][0]
   }
   else  {
      MainTransText := oJSON[0][0][0]
      Loop % oJSON[1].length  {
         trans .= "`n+"
         obj := oJSON[1][A_Index-1][1]
         Loop % obj.length  {
            txt := obj[A_Index - 1]
            trans .= (MainTransText = txt ? "" : "`n" txt)
         }
      }
   }
   if !IsObject(oJSON[1])
      MainTransText := trans := Trim(trans, ",+`n ")
   else
      trans := MainTransText . "`n+`n" . Trim(trans, ",+`n ")
   from := oJSON[2]
   trans := Trim(trans, ",+`n ")
   Return trans
}
SendRequest(JS, str, tl, sl, proxy) {
   ComObjError(false)
   http := ComObjCreate("WinHttp.WinHttpRequest.5.1")
   ( proxy && http.SetProxy(2, proxy) )
   tl1=%tl1%
   ;http.open( "POST", "https://translate.google.com/translate_a/single?client=t&sl="
   ;                   "https://translate.google.com/#view=home&op=translate&client=t&sl="  ;- usual in web
   http.open( "POST", "https://translate.google.com/translate_a/single?client=webapp&sl="
      . sl . "&tl=" . tl1 . "&hl=" . tl1
      . "&dt=at&dt=bd&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&dt=t&ie=UTF-8&oe=UTF-8&otf=0&ssel=0&tsel=0&pc=1&kc=1"
      . "&tk=" . JS.("tk").(str), 1 )
   http.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8")
   http.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0")
   http.send("q=" . URIEncode(str))
   http.WaitForResponse(-1)
   Return http.responsetext
}
URIEncode(str, encoding := "UTF-8")  {
   urlstr:=""-
   VarSetCapacity(var, StrPut(str, encoding))
   StrPut(str, &var, encoding)
   While code := NumGet(Var, A_Index - 1, "UChar")  {
      bool := (code > 0x7F || code < 0x30 || code = 0x3D)
      UrlStr .= bool ? "%" . Format("{:02X}", code) : Chr(code)
   }
   Return UrlStr
}
GetJScript()
{
   script =
   (
      var TKK = ((function() {
        var a = 561666268;
        var b = 1526272306;
        return 406398 + '.' + (a + b);
      })());
      function b(a, b) {
        for (var d = 0; d < b.length - 2; d += 3) {
            var c = b.charAt(d + 2),
                c = "a" <= c ? c.charCodeAt(0) - 87 : Number(c),
                c = "+" == b.charAt(d + 1) ? a >>> c : a << c;
            a = "+" == b.charAt(d) ? a + c & 4294967295 : a ^ c
        }
        return a
      }
      function tk(a) {
          for (var e = TKK.split("."), h = Number(e[0]) || 0, g = [], d = 0, f = 0; f < a.length; f++) {
              var c = a.charCodeAt(f);
              128 > c ? g[d++] = c : (2048 > c ? g[d++] = c >> 6 | 192 : (55296 == (c & 64512) && f + 1 < a.length && 56320 == (a.charCodeAt(f + 1) & 64512) ?
              (c = 65536 + ((c & 1023) << 10) + (a.charCodeAt(++f) & 1023), g[d++] = c >> 18 | 240,
              g[d++] = c >> 12 & 63 | 128) : g[d++] = c >> 12 | 224, g[d++] = c >> 6 & 63 | 128), g[d++] = c & 63 | 128)
          }
          a = h;
          for (d = 0; d < g.length; d++) a += g[d], a = b(a, "+-a^+6");
          a = b(a, "+-3^+b+-f");
          a ^= Number(e[1]) || 0;
          0 > a && (a = (a & 2147483647) + 2147483648);
          a `%= 1E6;
          return a.toString() + "." + (a ^ h)
      }
   )
   Return script
}
CreateScriptObj() {
   static doc
   doc := ComObjCreate("htmlfile")
   doc.write("<meta http-equiv='X-UA-Compatible' content='IE=9'>")
   Return ObjBindMethod(doc.parentWindow, "eval")
}
;-----------------------------------------------------------------
;-- some examples to select 
language:
e5x:=""
e5x=
(Ltrim join|
nl_Nederlands
af_Suid-Afrika
fy_Fryslân
eu_Basque
ca_Catalan
de_Deutsch
da_Dansk
sv_Sverige
no_Norge
is_Iceland
fi_Suomen
en_English
pt_Portugues
es_Español
it_Italia
fr_Français
ru_Rossija
zh-CN_Chinese
ja_Nippon
ko_Korea
ro_Romania
bg_Bulgaria
mk_Macedonia
el_Greek
tr_Turkiye
sq_Albania
hr_Croatia
sr_Serbia
sl_Slovenia
hu_Hungary
cs_Czech
sk_Slovakia
pl_Poland
be_Belarus
uk_Ukraina
et_Estonia
lv_Latvija
lt_Lituania
az_Azerbaijan 
ka_Georgian
ar_Arabic
iw_Hebrew
hi_Hindi
id_Indonesia
ms_Malaysia
vi_Vietnam
th_Thai
ta_Tamil
ur_Urdu
sw_Swahili
bn_Bengal
%s%
%s%
)
return
;====================== END SCRIPT ==================================================

I feel like we're talking past us. my complicated script above works as it should. just it is extremely cumbersome. I just asked for a simpler version!?

I have known the version of @teadrinker since you suggested it to me 6 months ago, since then I have been involved and optimize it as I like it.

@rommmcek maybe you have an idea how i could optimize it?
User avatar
rommmcek
Posts: 1470
Joined: 15 Aug 2014, 15:18

Re: Using Google Translate to automate text translation

02 Mar 2020, 04:51

Your script is very basic, there is not much to do. Nevertheless I gave it a try to be less "cumbersome".
Spoiler
Edit: Fixed bug to display correct translating language.

P.s.: I updated modified teadrinker's script.
Last edited by rommmcek on 03 Mar 2020, 01:31, edited 4 times in total.
User avatar
rommmcek
Posts: 1470
Joined: 15 Aug 2014, 15:18

Re: Using Google Translate to automate text translation

02 Mar 2020, 11:30

Which one? UnReALiTyy's translates Clipboard content when run. Modified teadrinker's has Message box examples to show info about language detection.
UnReALiTyy
Posts: 223
Joined: 06 Jun 2017, 11:38

Re: Using Google Translate to automate text translation

02 Mar 2020, 12:34

@rommmcek this is a perfect improvement, thanks a lot for that.
even if i don't understand your changes to these 2 lines, it is a simplification for me.

Code: Select all

Gui, Add, Edit, y40 x150 w120 vedt2, % (trl:= GoogleTranslate(clp,, to:= "de")).1
test := InStr(e5x, trl.2 .= "_")
garry
Posts: 3740
Joined: 22 Dec 2013, 12:50

Re: Using Google Translate to automate text translation

02 Mar 2020, 13:06

ok , first copy text then start script
EDIT : how to translate xy-language to selected language ? 谢谢 >>> Спасибо
Last edited by garry on 02 Mar 2020, 15:13, edited 2 times in total.
UnReALiTyy
Posts: 223
Joined: 06 Jun 2017, 11:38

Re: Using Google Translate to automate text translation

02 Mar 2020, 13:13

@garry yes i know, it was less about using the script and more about understanding the script
User avatar
rommmcek
Posts: 1470
Joined: 15 Aug 2014, 15:18

Re: Using Google Translate to automate text translation

02 Mar 2020, 13:56

I modified GoogleTranslate() function to return object instead of plain text in order to simplify the script. That's why .1 and .2!
Besides: You don't need this line at all: Gui, Submit, nohide (changed the script above).
UnReALiTyy
Posts: 223
Joined: 06 Jun 2017, 11:38

Re: Using Google Translate to automate text translation

02 Mar 2020, 15:43

understand (trl:= GoogleTranslate(clp,, to:= "de")).1 is the first value from the brackets that is returned by Return [trans, lng] and test := InStr(e5x, trl.2 .= "_") the second value in brackets. many thanks for the explanation and help
User avatar
rommmcek
Posts: 1470
Joined: 15 Aug 2014, 15:18

Re: Using Google Translate to automate text translation

04 Mar 2020, 06:05

I extracted additional translation data:

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 155 guests