Google translate in tooltip [Replaced by standalone app]
cheers! ;0) j
::T_T:: T_T() Return T_T() { T := Input("Text", "V T30", ".") If(T == "") { SendInput, Cancelled. Return } L := Input("To language", "V T15", ".") If(L == "") { SendInput, Cancelled. Return } If(Language_List_Check(L) == False) { SendInput, Unsupported language. Return } S := UnHTM(UnSlashUnicode(UTF82Ansi(URL_DTF("http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=" uriEncode(Transform_Unicode(T)) "&langpair=%7C" L)))) SetKeyDelay, 1 Send, % String_Replace(String_Replace(String_Replace(String_Replace(json(S, "responseData.translatedText"), "!", "{!}", "All"), "^", "{^}", "All"), "&", "{&}", "All"), "$", "{$}", "All") "{Enter}" Return } ;--- URL_DTF(U) { F := % A_Temp "\" Random_String(5) ".Tmp" URLDownloadToFile, % U, % F If(ErrorLevel == 1) TrayTip, Error, A problem occured during download., 3 FileRead, R, % F FileDelete, % F Return R } Parse(V, S, N, D="") { If(N == "L") { Loop, Parse, V, % S I := A_Index Loop, Parse, V, % S If(A_Index == I) Return A_LoopField } Else { Loop, Parse, V, % S If(A_Index == N) Return A_LoopField } Return D } Random_String(N) { Loop, % N { Random, T, 1, 2 If(T == 1) Random, S, 0, 9 Else { Random, S, 97, 122 Transform, S, Chr, % S } R := R S } Return R } String_Replace(S, T, R, A="") { StringReplace, S, S, % T, % R, % A Return S } Input(S, O, E) { SendInput, % S ": " Input, I, %O%, %E% IfInString, ErrorLevel, Endkey SendInput, % "{Backspace " StrLen(S) + StrLen(I) + 3 "}" Else IfInString, ErrorLevel, Max SendInput, % "{Backspace " StrLen(S) + StrLen(I) + 2 "}" Else IfInString, ErrorLevel, Timeout SendInput, % "{Backspace " StrLen(S) + StrLen(I) + 2 "}" Return I } json(ByRef js, s, v = "") { j = %js% Loop, Parse, s, . { p = 2 RegExMatch(A_LoopField, "([+\-]?)([^[]+)((?:\[\d+\])*)", q) Loop { If (!p := RegExMatch(j, "(?<!\\)(""|')([^\1]+?)(?<!\\)(?-1)\s*:\s*((\{(?:[^{}]++|(?-1))*\})|(\[(?:[^[\]]++|(?-1))*\])|" . "(?<!\\)(""|')[^\7]*?(?<!\\)(?-1)|[+\-]?\d+(?:\.\d*)?|true|false|null?)\s*(?:,|$|\})", x, p)) Return Else If (x2 == q2 or q2 == "*") { j = %x3% z += p + StrLen(x2) - 2 If (q3 != "" and InStr(j, "[") == 1) { StringTrimRight, q3, q3, 1 Loop, Parse, q3, ], [ { z += 1 + RegExMatch(SubStr(j, 2, -1), "^(?:\s*((\[(?:[^[\]]++|(?-1))*\])|(\{(?:[^{\}]++|(?-1))*\})|[^,]*?)\s*(?:,|$)){" . SubStr(A_LoopField, 1) + 1 . "}", x) j = %x1% } } Break } Else p += StrLen(x) } } If v != { vs = " If (RegExMatch(v, "^\s*(?:""|')*\s*([+\-]?\d+(?:\.\d*)?|true|false|null?)\s*(?:""|')*\s*$", vx) and (vx1 + 0 or vx1 == 0 or vx1 == "true" or vx1 == "false" or vx1 == "null" or vx1 == "nul")) vs := "", v := vx1 StringReplace, v, v, ", \", All js := SubStr(js, 1, z := RegExMatch(js, ":\s*", zx, z) + StrLen(zx) - 1) . vs . v . vs . SubStr(js, z + StrLen(x3) + 1) } Return, j == "false" ? 0 : j == "true" ? 1 : j == "null" or j == "nul" ? "" : SubStr(j, 1, 1) == """" ? SubStr(j, 2, -1) : j } Language_List_Check(L) { A = af|sq|am|ar|hy|az|eu|be|bn|bh|xx-bork|bs|br|bg|km|ca|zh-CN|zh-TW|co|hr|cs|da|nl|xx-elmer|en|eo|et|fo|tl|fi|fr|fy|gl|ka|de|el|gn|gu|xx-hacker|ha|iw|hi|hu|is|id|ia|ga|it|ja|jw|kn|kk|rw|rn|xx-kilngon|ko|ku|ky|lo|la|lv|ln|lt|mk|mg|ms|ml|mt|mi|mr|mo|mn|sr-ME|ne|no|nn|oc|or|om|ps|fa|xx-pirate|pl|pt-BR|pt-PT|pa|qu|ro|rm|ru|gd|sr|sh|st|sn|sd|si|sk|sl|so|es|su|sw|sv|tg|ta|tt|te|th|ti|to|tr|tk|tw|ug|uk|ur|uz|vi|cy|xh|yi|yo|zu Loop, Parse, A, | If(L == A_LoopField) Return True Return False } UTF82Ansi(zString) { Ansi2Unicode(zString, wString, 65001) Unicode2Ansi(wString, sString, 0) Return sString } Ansi2Unicode(ByRef sString, ByRef wString, CP = 0) { nSize := DllCall("MultiByteToWideChar" , "Uint", CP , "Uint", 0 , "Uint", &sString , "int", -1 , "Uint", 0 , "int", 0) VarSetCapacity(wString, nSize * 2) DllCall("MultiByteToWideChar" , "Uint", CP , "Uint", 0 , "Uint", &sString , "int", -1 , "Uint", &wString , "int", nSize) } Unicode2Ansi(ByRef wString, ByRef sString, CP = 0) { nSize := DllCall("WideCharToMultiByte" , "Uint", CP , "Uint", 0 , "Uint", &wString , "int", -1 , "Uint", 0 , "int", 0 , "Uint", 0 , "Uint", 0) VarSetCapacity(sString, nSize) DllCall("WideCharToMultiByte" , "Uint", CP , "Uint", 0 , "Uint", &wString , "int", -1 , "str", sString , "int", nSize , "Uint", 0 , "Uint", 0) } UriEncode(str) { ; v 0.3 / (w) 24.06.2008 by derRaphael / zLib-Style release b_Format := A_FormatInteger data := "" SetFormat,Integer,H Loop,Parse,str if ((Asc(A_LoopField)>0x7f) || (Asc(A_LoopField)<0x30) || (asc(A_LoopField)=0x3d)) data .= "%" . ((StrLen(c:=SubStr(ASC(A_LoopField),3))<2) ? "0" . c : c) Else data .= A_LoopField SetFormat,Integer,%b_format% return data } UnSlashUnicode(s) { ; unslash unicode sequences like \u0026 ; by Mikhail Kuropyatnikov 2009 ([email protected]) rx = \\u([0-9a-fA-F]{4}) pos = 0 loop { pos := RegExMatch(s,rx,m,pos+1) if (pos = 0) break StringReplace, s, s, %m%, % Chr("0x" . SubStr(m,3,4)) } return s } Transform_Unicode(V) { C := Clipboard Clipboard := V Transform, U, Unicode Clipboard := C Return U } UnHTM(HTM) { Static HT IfEqual,HT,, SetEnv,HT, % "ááââ´´ææàà&ååãã&au" . "mlä&bdquo„¦¦&bull•ç縸¢¢&circˆ©©¤¤&dagger†&dagger‡°" . "°÷÷ééêêèèððëë&euro€&fnofƒ½½¼¼¾¾>>&h" . "ellip…ííîî¡¡ìì¿¿ïï««&ldquo“&lsaquo‹&lsquo‘<<&m" . "acr¯&mdash—µµ··  &ndash–¬¬ññóóôô&oeligœòò&or" . "dfªººøøõõöö¶¶&permil‰±±££"""»»&rdquo”®" . "®&rsaquo›&rsquo’&sbquo‚&scaronš§§­¹¹²²³³ßßþþ&tilde˜&tim" . "es×&trade™úúûûùù¨¨üüýý¥¥ÿÿ" TXT := RegExReplace( HTM,"<[^>]+>" ) Loop, Parse, TXT, &`; L := "&" A_LoopField ";", R .= (!(A_Index&1)) ? ( (!InStr(R,L,1)) ? L:"" ) : "" StringTrimRight, R, R, 1 Loop, Parse, R , `; If F := InStr( HT, A_LoopField ) StringReplace, TXT,TXT, %A_LoopField%`;, % SubStr( HT,F+StrLen(A_LoopField), 1 ), All Else If ( SubStr( A_LoopField,2,1)="#" ) StringReplace, TXT, TXT, %A_LoopField%`;, % Chr(SubStr(A_LoopField,3)), All Return RegExReplace( TXT, "(^\s*|\s*$)") }
For example:
T_T This sentence is written in French!.fr.
Note, you must type the . button to end the input!
Watch this video for the example!
A full list of supported languages (Ignore the hl=.. CBA to remove them all. Lol):
/* Language List: hl=af Afrikaans hl=sq Albanian hl=am Amharic hl=ar Arabic hl=hy Armenian hl=az Azerbaijani hl=eu Basque hl=be Belarusian hl=bn Bengali hl=bh Bihari hl=xx-bork Bork, bork, bork! hl=bs Bosnian hl=br Breton hl=bg Bulgarian hl=km Cambodian hl=ca Catalan hl=zh-CN Chinese (Simplified) hl=zh-TW Chinese (Traditional) hl=co Corsican hl=hr Croatian hl=cs Czech hl=da Danish hl=nl Dutch hl=xx-elmer Elmer Fudd hl=en English hl=eo Esperanto hl=et Estonian hl=fo Faroese hl=tl Filipino hl=fi Finnish hl=fr French hl=fy Frisian hl=gl Galician hl=ka Georgian hl=de German hl=el Greek hl=gn Guarani hl=gu Gujarati hl=xx-hacker Hacker hl=ha Hausa hl=iw Hebrew hl=hi Hindi hl=hu Hungarian hl=is Icelandic hl=id Indonesian hl=ia Interlingua hl=ga Irish hl=it Italian hl=ja Japanese hl=jw Javanese hl=kn Kannada hl=kk Kazakh hl=rw Kinyarwanda hl=rn Kirundi hl=xx-klingon Klingon hl=ko Korean hl=ku Kurdish hl=ky Kyrgyz hl=lo Laothian hl=la Latin hl=lv Latvian hl=ln Lingala hl=lt Lithuanian hl=mk Macedonian hl=mg Malagasy hl=ms Malay hl=ml Malayalam hl=mt Maltese hl=mi Maori hl=mr Marathi hl=mo Moldavian hl=mn Mongolian hl=sr-ME Montenegrin hl=ne Nepali hl=no Norwegian hl=nn Norwegian (Nynorsk) hl=oc Occitan hl=or Oriya hl=om Oromo hl=ps Pashto hl=fa Persian hl=xx-pirate Pirate hl=pl Polish hl=pt-BR Portuguese (Brazil) hl=pt-PT Portuguese (Portugal) hl=pa Punjabi hl=qu Quechua hl=ro Romanian hl=rm Romansh hl=ru Russian hl=gd Scots Gaelic hl=sr Serbian hl=sh Serbo-Croatian hl=st Sesotho hl=sn Shona hl=sd Sindhi hl=si Sinhalese hl=sk Slovak hl=sl Slovenian hl=so Somali hl=es Spanish hl=su Sundanese hl=sw Swahili hl=sv Swedish hl=tg Tajik hl=ta Tamil hl=tt Tatar hl=te Telugu hl=th Thai hl=ti Tigrinya hl=to Tonga hl=tr Turkish hl=tk Turkmen hl=tw Twi hl=ug Uighur hl=uk Ukrainian hl=ur Urdu hl=uz Uzbek hl=vi Vietnamese hl=cy Welsh hl=xh Xhosa hl=yi Yiddish hl=yo Yoruba hl=zu Zulu */
I find it very useful for games without actual edit controls.. Where you just type a normal sentence in-game to have it translated.
I'm using the google translator very much. A good support for translating, but I have some problems:
When I translate "Hej med dig" it is showing "sv>da"
It is danish, and should translate to english.
Where does the "sv" come from?
I'm using:
Translate("en","da") ; from English to Danish
Translate(to,anti)
/Benny
sv = swedishHi.
I'm using the google translator very much. A good support for translating, but I have some problems:
When I translate "Hej med dig" it is showing "sv>da"
It is danish, and should translate to english.
Where does the "sv" come from?
I'm using:
Translate("en","da") ; from English to Danish
Translate(to,anti)
/Benny
"hej med dig" = swedish (but not grammaticly correct)
Hi.
I'm using the google translator very much. A good support for translating, but I have some problems:
When I translate "Hej med dig" it is showing "sv>da"
It is danish, and should translate to english.
Where does the "sv" come from?
I'm using:
Translate("en","da") ; from English to Danish
Translate(to,anti)
/Benny
It seems to be (still) set to autodetect the source language.
... reminds me of the saying that danes might believe they can speak Swedish, while swedes tend to assume they understand Danish - while it often turns out that swedes do not understand Danish and danes cannot speak Swedish : )
error: parameter #2 invalid
specifically: unicode
Line#
}
~^C:: DoublePress()
Translate(from,to)
{
if clipboard =
return
----> Transform, unicodeClipboard, Unicode
the program will exit.
mb somebody can fix.
ive tried lots of things but gets lots of errors, such as functions within functions etc
A full list of supported languages (Ignore the hl=.. CBA to remove them all. Lol):
is no-one aware of CTRL+H in notepad? =[
<!-- m -->http://www.autohotke... ... 084#365084<!-- m -->
'cause I use copy and paste a lot.
+esc::exitapp ; to exit the script ::T_T2:: T_T(1) ; enter T_T2 to use the text on the clipboard as the 'from' text Return ::T_T:: T_T() Return T_T(flag=0) { if flag T :=clipboard else T := Input("Text", "V T30", ".") If(T == "") { SendInput, Cancelled. Return } L := Input("To language", "V T15", ".") If(L == "") { SendInput, Cancelled. Return } If(Language_List_Check(L) == False) { SendInput, Unsupported language. Return } S := UnHTM(UnSlashUnicode(UTF82Ansi(URL_DTF("http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=" uriEncode(Transform_Unicode(T)) "&langpair=%7C" L)))) SetKeyDelay, 1 Send, % String_Replace(String_Replace(String_Replace(String_Replace(json(S, "responseData.translatedText"), "!", "{!}", "All"), "^", "{^}", "All"), "&", "{&}", "All"), "$", "{$}", "All") "{Enter}" Return } ;--- URL_DTF(U) { F := % A_Temp "\" Random_String(5) ".Tmp" URLDownloadToFile, % U, % F If(ErrorLevel == 1) TrayTip, Error, A problem occured during download., 3 FileRead, R, % F FileDelete, % F Return R } Parse(V, S, N, D="") { If(N == "L") { Loop, Parse, V, % S I := A_Index Loop, Parse, V, % S If(A_Index == I) Return A_LoopField } Else { Loop, Parse, V, % S If(A_Index == N) Return A_LoopField } Return D } Random_String(N) { Loop, % N { Random, T, 1, 2 If(T == 1) Random, S, 0, 9 Else { Random, S, 97, 122 Transform, S, Chr, % S } R := R S } Return R } String_Replace(S, T, R, A="") { StringReplace, S, S, % T, % R, % A Return S } Input(S, O, E) { SendInput, % S ": " Input, I, %O%, %E% IfInString, ErrorLevel, Endkey SendInput, % "{Backspace " StrLen(S) + StrLen(I) + 3 "}" Else IfInString, ErrorLevel, Max SendInput, % "{Backspace " StrLen(S) + StrLen(I) + 2 "}" Else IfInString, ErrorLevel, Timeout SendInput, % "{Backspace " StrLen(S) + StrLen(I) + 2 "}" Return I } json(ByRef js, s, v = "") { j = %js% Loop, Parse, s, . { p = 2 RegExMatch(A_LoopField, "([+\-]?)([^[]+)((?:\[\d+\])*)", q) Loop { If (!p := RegExMatch(j, "(?<!\\)(""|')([^\1]+?)(?<!\\)(?-1)\s*:\s*((\{(?:[^{}]++|(?-1))*\})|(\[(?:[^[\]]++|(?-1))*\])|" . "(?<!\\)(""|')[^\7]*?(?<!\\)(?-1)|[+\-]?\d+(?:\.\d*)?|true|false|null?)\s*(?:,|$|\})", x, p)) Return Else If (x2 == q2 or q2 == "*") { j = %x3% z += p + StrLen(x2) - 2 If (q3 != "" and InStr(j, "[") == 1) { StringTrimRight, q3, q3, 1 Loop, Parse, q3, ], [ { z += 1 + RegExMatch(SubStr(j, 2, -1), "^(?:\s*((\[(?:[^[\]]++|(?-1))*\])|(\{(?:[^{\}]++|(?-1))*\})|[^,]*?)\s*(?:,|$)){" . SubStr(A_LoopField, 1) + 1 . "}", x) j = %x1% } } Break } Else p += StrLen(x) } } If v != { vs = " If (RegExMatch(v, "^\s*(?:""|')*\s*([+\-]?\d+(?:\.\d*)?|true|false|null?)\s*(?:""|')*\s*$", vx) and (vx1 + 0 or vx1 == 0 or vx1 == "true" or vx1 == "false" or vx1 == "null" or vx1 == "nul")) vs := "", v := vx1 StringReplace, v, v, ", \", All js := SubStr(js, 1, z := RegExMatch(js, ":\s*", zx, z) + StrLen(zx) - 1) . vs . v . vs . SubStr(js, z + StrLen(x3) + 1) } Return, j == "false" ? 0 : j == "true" ? 1 : j == "null" or j == "nul" ? "" : SubStr(j, 1, 1) == """" ? SubStr(j, 2, -1) : j } Language_List_Check(L) { A = af|sq|am|ar|hy|az|eu|be|bn|bh|xx-bork|bs|br|bg|km|ca|zh-CN|zh-TW|co|hr|cs|da|nl|xx-elmer|en|eo|et|fo|tl|fi|fr|fy|gl|ka|de|el|gn|gu|xx-hacker|ha|iw|hi|hu|is|id|ia|ga|it|ja|jw|kn|kk|rw|rn|xx-kilngon|ko|ku|ky|lo|la|lv|ln|lt|mk|mg|ms|ml|mt|mi|mr|mo|mn|sr-ME|ne|no|nn|oc|or|om|ps|fa|xx-pirate|pl|pt-BR|pt-PT|pa|qu|ro|rm|ru|gd|sr|sh|st|sn|sd|si|sk|sl|so|es|su|sw|sv|tg|ta|tt|te|th|ti|to|tr|tk|tw|ug|uk|ur|uz|vi|cy|xh|yi|yo|zu Loop, Parse, A, | If(L == A_LoopField) Return True Return False } UTF82Ansi(zString) { Ansi2Unicode(zString, wString, 65001) Unicode2Ansi(wString, sString, 0) Return sString } Ansi2Unicode(ByRef sString, ByRef wString, CP = 0) { nSize := DllCall("MultiByteToWideChar" , "Uint", CP , "Uint", 0 , "Uint", &sString , "int", -1 , "Uint", 0 , "int", 0) VarSetCapacity(wString, nSize * 2) DllCall("MultiByteToWideChar" , "Uint", CP , "Uint", 0 , "Uint", &sString , "int", -1 , "Uint", &wString , "int", nSize) } Unicode2Ansi(ByRef wString, ByRef sString, CP = 0) { nSize := DllCall("WideCharToMultiByte" , "Uint", CP , "Uint", 0 , "Uint", &wString , "int", -1 , "Uint", 0 , "int", 0 , "Uint", 0 , "Uint", 0) VarSetCapacity(sString, nSize) DllCall("WideCharToMultiByte" , "Uint", CP , "Uint", 0 , "Uint", &wString , "int", -1 , "str", sString , "int", nSize , "Uint", 0 , "Uint", 0) } UriEncode(str) { ; v 0.3 / (w) 24.06.2008 by derRaphael / zLib-Style release b_Format := A_FormatInteger data := "" SetFormat,Integer,H Loop,Parse,str if ((Asc(A_LoopField)>0x7f) || (Asc(A_LoopField)<0x30) || (asc(A_LoopField)=0x3d)) data .= "%" . ((StrLen(c:=SubStr(ASC(A_LoopField),3))<2) ? "0" . c : c) Else data .= A_LoopField SetFormat,Integer,%b_format% return data } UnSlashUnicode(s) { ; unslash unicode sequences like \u0026 ; by Mikhail Kuropyatnikov 2009 ([email protected]) rx = \\u([0-9a-fA-F]{4}) pos = 0 loop { pos := RegExMatch(s,rx,m,pos+1) if (pos = 0) break StringReplace, s, s, %m%, % Chr("0x" . SubStr(m,3,4)) } return s } Transform_Unicode(V) { C := Clipboard Clipboard := V Transform, U, Unicode Clipboard := C Return U } UnHTM(HTM) { Static HT IfEqual,HT,, SetEnv,HT, % "ááââ´´ææàà&ååãã&au" . "mlä&bdquo„¦¦&bull•ç縸¢¢&circˆ©©¤¤&dagger†&dagger‡°" . "°÷÷ééêêèèððëë&euro€&fnofƒ½½¼¼¾¾>>&h" . "ellip…ííîî¡¡ìì¿¿ïï««&ldquo“&lsaquo‹&lsquo‘<<&m" . "acr¯&mdash—µµ··  &ndash–¬¬ññóóôô&oeligœòò&or" . "dfªººøøõõöö¶¶&permil‰±±££"""»»&rdquo”®" . "®&rsaquo›&rsquo’&sbquo‚&scaronš§§­¹¹²²³³ßßþþ&tilde˜&tim" . "es×&trade™úúûûùù¨¨üüýý¥¥ÿÿ" TXT := RegExReplace( HTM,"<[^>]+>" ) Loop, Parse, TXT, &`; L := "&" A_LoopField ";", R .= (!(A_Index&1)) ? ( (!InStr(R,L,1)) ? L:"" ) : "" StringTrimRight, R, R, 1 Loop, Parse, R , `; If F := InStr( HT, A_LoopField ) StringReplace, TXT,TXT, %A_LoopField%`;, % SubStr( HT,F+StrLen(A_LoopField), 1 ), All Else If ( SubStr( A_LoopField,2,1)="#" ) StringReplace, TXT, TXT, %A_LoopField%`;, % Chr(SubStr(A_LoopField,3)), All Return RegExReplace( TXT, "(^\s*|\s*$)") }
offtopic: I have a spanish autocorrect .txt file that I would like to put on the site like the english one, it is 643 words. <!-- m -->http://www.autohotke...AutoCorrect.ahk<!-- m -->
I want to list all the languages smoothly with the info (en) English, maybe sort it alphabetically and also store it's alphabetical number (for my DropDownlist). What's the best way to do this?
Work-in-progress.
EDIT: Saw the above posted full list of languages
EDIT2:
I have a list of all languages and codes now, you just need to parse it with | as a delimiter. All languages should be there now, although some are named non-perfectly (such as "NorwegianNynorsk" instead of "Norwegian (Nynorsk)"
You can find the list HERE
- SETTINGS (Language Picker)
- GUI
- Supports all (!) languages
To implement: Faster languageselection, maybe if you go Ctrl+C(x3) you get an InputBox asking for language to translate to?
Download the AHK file HERE
Some minor changes makes it work on the UniCode versions:
... ;;; tonne, transform Unicode is not supported (nor needed) in unicode version ; Transform, unicodeClipboard, Unicode ;;; tonne, save for later reference unicodeClipboard := clipboard anti_translate: url := "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=" . uriEncode(unicodeClipboard) . "&langpair=%7C" . translate_to ; simulate UrlDownloadToVAR UrlDownloadToFile, %url%, %A_ScriptDir%\translate.html ;;; tonne, added *p65001 to read UTF8 FileRead, json_trans, *p65001 %A_ScriptDir%\translate.html ;;; tonne, skip conversion ; json_trans := UTF82Ansi(json_trans) ...
Nice!
Some minor changes makes it work on the UniCode versions:... ;;; tonne, transform Unicode is not supported (nor needed) in unicode version ; Transform, unicodeClipboard, Unicode ;;; tonne, save for later reference unicodeClipboard := clipboard anti_translate: url := "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=" . uriEncode(unicodeClipboard) . "&langpair=%7C" . translate_to ; simulate UrlDownloadToVAR UrlDownloadToFile, %url%, %A_ScriptDir%\translate.html ;;; tonne, added *p65001 to read UTF8 FileRead, json_trans, *p65001 %A_ScriptDir%\translate.html ;;; tonne, skip conversion ; json_trans := UTF82Ansi(json_trans) ...
Thanks a tonne, tonne. However, it didn't seem to work. I lose my åäö's when I do this, causing malfunction in the translation (doesn't seem åäö's get sent to google, even). Was your modification in reply to my modification, or someone else's? The code is Here around line 92 and forth.
I realized this halted in development for me, I think I can do something really pretty off this.