eltorro Posted March 7, 2008 Share Posted March 7, 2008 (edited) *** YES I KNOW ABOUT ROSETTA STONE ***A simple language translation tool. Uses Google to do the translation.I was working on a program and I needed a way to automate translating some strings. So i whipped up a little udf to do just that. Nothing spectacular, but could be useful for others who need to do the same.I set the default language pair to translate English to Spanish because of where I live. This is easy to change though for ones needs.Some languages cannot be displayed without enabling unicode text support.Enable this in - Control Panel >> Region and Language Options>> Languages >> Install files for complex script and right to left languages (Arabic)Install files for East Asian languages.Checking both will add about 240MB to your system.The gui is just a wrapper for demo/testing.edit: added button to paste from clipboard and paste translated text to clipboard.expandcollapse popup; simple usage: ;#Include <_GGLTranslate.au3> ;~ Local $text = StringFormat("Error, object not passes in parameter 1.\n#Please check the paramters and try again.\n") ;~;============================================================================== ;~ Local $e = _URLEncode($text) ;~ Local $d = _URLDecode($e) ;~ Local $m = StringFormat("Orig: %s\nEncoded: %s\nDecoded: %s",$text,$e,$d) ;~ MsgBox(0,"Encodings",$m) ;~;============================================================================== ;~ MsgBox(0,"English to Spanish",_GoogleTranslateString($text)) ;~ MsgBox(0,"English to Dutch",_GoogleTranslateString($text,"en|nl")) ;~;============================================================================== #include <GUIConstants.au3> #Include <GuiComboBox.au3> #Include <GuiEdit.au3> #Include <user\_GGLTRanslate.au3> Local $aLangs[29]=["ar|en","zh|en","zh-CN|zh-TW","zh-TW|zh-CN","nl|en","en|ar" _ ,"en|zh-CN","en|zh-TW","en|nl","en|fr","en|de","en|el","en|it","en|ja","en|ko" _ ,"en|pt","en|ru","en|es","fr|en","fr|de","de|en","de|fr","el|en","it|en","ja|en" _ ,"ko|en","pt|en","ru|en","es|en"] Local $languages = "" & _ "Chinese to English - zh:en" & _ "|Chinese (Simplified to Traditional) - zh-CN:zh-TW" & _ "|Chinese (Traditional to Simplified) - zh-TW:zh-CN" & _ "|Dutch to English - nl:en" & _ "|English to Arabic - en:ar" & _ "|English to Chinese (Simplified) - en:zh-CN" & _ "|English to Chinese (Traditional) - en:zh-TW" & _ "|English to Dutch - en:nl" & _ "|English to French - en:fr" & _ "|English to German - en:de" & _ "|English to Greek - en:el" & _ "|English to Italian - en:it" & _ "|English to Japanese - en:ja" & _ "|English to Korean - en:ko" & _ "|English to Portuguese - en:pt" & _ "|English to Russian - en:ru" & _ "|English to Spanish - en:es" & _ "|French to English - fr:en" & _ "|French to German - fr:de" & _ "|German to English - de:en" & _ "|German to French - de:fr" & _ "|Greek to English - el:en" & _ "|Italian to English - it:en" & _ "|Japanese to English - ja:en" & _ "|Korean to English - ko:en" & _ "|Portuguese to English - pt:en" & _ "|Russian to English - ru:en" & _ "|Spanish to English - es:en" #Region ### START Koda GUI section ### Form= Global $Form1 = GUICreate("gglTranslate", 633, 363, 193, 125) Global $Edit1 = GUICtrlCreateEdit("", 10, 30, 611, 116) Global $Edit2 = GUICtrlCreateEdit("", 10, 185, 611, 116) Global $Combo1 = GUICtrlCreateCombo("Arabic to English - ar:en", 185, 155, 256, 25) GUICtrlSetData(-1,$languages,"English to Spanish - en:es") Global $Translate = GUICtrlCreateButton("Translate", 545, 150, 75, 25, 0) Global $Paste = GuiCtrlCreateButton("From Clip",450,150,75,25,0) Global $Label1 = GUICtrlCreateLabel("Text to Translate:", 10, 10, 87, 17) Global $Label2 = GUICtrlCreateLabel("Translated Text:", 10, 160, 81, 17) Global $Label3 = GUICtrlCreateLabel("Language Pair:", 100, 155, 76, 17) Global $Progress1 = GUICtrlCreateProgress(10, 340, 610, 17) Global $Cancel = GUICtrlCreateButton("Cancel", 545, 305, 75, 25, 0) Global $PasteTo = GuiCtrlCreateButton("To Clip",450,305,75,25,0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### if Not FileExists(".ggl1") Then GuiCtrlSetData($Edit1,"Type some text here and click translate.") FileWriteline(".ggl1","") EndIf $langpair = "en|es" While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Combo1 $langpair = $aLangs[_GUICtrlComboBox_GetCurSel($Combo1)] Case $Translate _TranslateWithProgress() Case $Paste Local $clip = ClipGet() if $clip <> "" Then GuiCtrlSetData($Edit1,$clip) $clip = "" ;remove the remark to automate translation on paste. ;_TranslateWithProgress() EndIf Case $PasteTo If _GuiCtrlEdit_GetTextLen($Edit2) >0 Then ClipPut(GuiCtrlRead($Edit2)) EndIf EndSwitch WEnd Func _TranslateWithProgress() Const $iSize = 512 Local $x, $iLen,$sText,$sTemp,$sTemp1,$pos,$iMsg $sText = GuiCtrlRead($Edit1) If $sText <> "" Then GuiCtrlSetData($Edit2,"") $iLen = StringLen($sText) ConsoleWrite($iLen&@lf) ; If $iLen > $iSize Then $x =1 GuiCtrlSetData($Progress1,10) While 1 If $iMsg = $Cancel Then If (MsgBox(4,"gglTranslate","Are you sure you wish to stop translating?")) = 6 Then ExitLoop EndIf EndIf $iMsg = GuiGetMsg() If $iLen > $iSize Then $sTemp = StringMid($sText,$x,$iSize) $pos = StringInstr($sTemp,@LF,0,-1) If $pos =0 Then $pos = StringInstr($sTemp," ",0,-1) If $pos = 0 Then $pos = StringLen($sTemp) $sTemp1 = StringLeft($sTemp,$pos) $x += $pos Else $sTemp1 = $sText $x += $iLen EndIf If $iMsg <> $Cancel Then $iMsg = GuiGetMsg() GuiCtrlSetData($Edit2,_GoogleTranslateString($sTemp1,$langpair,True),1) GuiCtrlSetData($Progress1,(100/$iLen)*$x) If $x >= $iLen then ExitLoop EndIf If $iMsg <> $Cancel Then $iMsg = GuiGetMsg() WEnd sleep(750) GUICtrlSetData($Progress1,0) EndIf EndFuncSave the function below as _GGLTranslate.au3expandcollapse popup; #INDEX# ================================================= ; Title .........: _GGlTranslate ; AutoIt Version: 3.2.3++ ; Language: English ; Description ...: Translates text between languages using Google web api. ; Author, Stephen Podhajecki gehossafats at netmdc dot com. ; ========================================================= ;; simple usage: ;~#Include <_GGLTranslate.au3> ;~ Local $text = StringFormat("Error, object not passes in parameter 1.\n#Please check the paramters and try again.\n") ;~ ; ========================================================= ;~ Local $e = _URLEncode($text) ;~ Local $d = _URLDecode($e) ;~ Local $m = StringFormat("Orig: %s\nEncoded: %s\nDecoded: %s",$text,$e,$d) ;~ MsgBox(0,"Encodings",$m) ;~ ; ========================================================= ;~ MsgBox(0,"English to Spanish",_GoogleTranslateString($text)) ;~ MsgBox(0,"English to Dutch",_GoogleTranslateString($text,"en|nl")) ;~ ; ========================================================= ; #FUNCTION# ============================================== ; Description ...: Uses Google to translate a string into another language ; Parameters ....: $sText - IN - The text to translate. ; $sLangPair - IN/OPTIONAL - The language pair separated by a pipe. ; $bEncodeURL - IN/OPTIONAL - Escape "illegal" characters from the text ; Return values .: On Success - The translated string. ; On Failure - The original string and @error set to 1 ; Author ........: Stephen Podhajecki {gehossafats at netmdc. com} ; Remarks .......: Requires internet access, ; Defaults to en|es English to Spanish. ; Defaults to False for URL encoding the text for the web. ; Other possible lang pairs are: ; |Arabic to English - ar|en ; |Chinese to English - zh|en ; |Chinese (Simplified to Traditional) - zh-CN|zh-TW ; |Chinese (Traditional to Simplified) - zh-TW|zh-CN ; |Dutch to English - nl|en ; |English to Arabic - en|ar ; |English to Chinese (Simplified) - en|zh-CN ; |English to Chinese (Traditional) - en|zh-TW ; |English to Dutch - en|nl ; |English to French - en|fr ; |English to German - en|de ; |English to Greek - en|el ; |English to Italian - en|it ; |English to Japanese - en|ja ; |English to Korean - en|ko ; |English to Portuguese - en|pt ; |English to Russian - en|ru ; |English to Spanish - en|es ; |French to English - fr|en ; |French to German - fr|de ; |German to English - de|en ; |German to French - de|fr ; |Greek to English - el|en ; |Italian to English - it|en ; |Japanese to English - ja|en ; |Korean to English - ko|en ; |Portuguese to English - pt|en ; |Russian to English - ru|en ; |Spanish to English - es|en ; Related .......: ; ========================================================= Func _GoogleTranslateString($sText,$sLangPair= -1,$bEncodeURL=False ) Local $url, $sTemp, $aTranslated, $sTranslated If $sLangPair = -1 Then $sLangPair = "en|es" $regex= '(?:<(?i)DIV id="?result_box"? dir="?ltr"?>)(.*?)(?:</(?i)DIV>)' $sTemp = $sText If $bEncodeURL Then $sTemp = _URLEncode($sText) EndIf $url =StringFormat('http://google.com/translate_t?langpair=%s&text=%s',$sLangPair,$sTemp) If(InetGet($url,".temp.html",1)) Then $aTranslated = StringRegExp(StringStripWS(FileRead(".temp.html"),7),$regex,3) If IsArray($aTranslated) Then FileDelete(".temp.html") $sTranslated = StringReplace($aTranslated[0],Chr(160),Chr(32)) $sTranslated = StringRegExpReplace($sTranslated,"((\s|\n)?<(?i)br)(.*?)(>)(\s)",@CRLF) ;$sTranslated = StringReplace($aTranslated[0],"<br>",@CRLF) If $bEncodeURL Then Return _URLDecode($sTranslated) EndIf Return $sTranslated EndIf EndIf Return SetError(1,0,$sText) EndFunc ; #FUNCTION# ============================================== ; Description ...: Encodes text for use in URLs ; Parameters ....: $sURL - IN - The text to encode ; Return values .: The encoded text ; Author ........: Stephen Podhajecki {gehossafats at netmdc. com} ; Remarks .......: Replaces defined characters with escaped hex values for url encoding. ; Encoding based on information provided here: http://www.blooberry.com/indexdot/html/topics/urlencoding.htm ; Related .......: _URLDecode ; ======================================================== Func _URLEncode($sURL) Local $aEncodable[13]=['"',"'","<",">","\","^","[","]","`","+","$",",","#"] ;encode % first because encoding will add more % to the url Local $sTemp = StringReplace($sURL,"%","%25") ;encode non-printable and space For $x = 0 to 32 $sTemp = StringReplace($sTemp,Chr($x),"%"&Hex($x,2)) Next ;encode "unsafe" For $x = 0 to UBound($aEncodable)-1 $sTemp = StringReplace($sTemp,$aEncodable[$x],"%"&Hex(Asc($aEncodable[$x]),2)) Next ;encode upper ascii and {}|~_ For $x = 123 to 255 $sTemp = StringReplace($sTemp,Chr($x),"%"&Hex($x,2)) Next Return $sTemp EndFunc ; #FUNCTION# ============================================== ; Description ...: Decodeds text for use in URLs ; Parameters ....: $sURL - IN - The text to decode ; Return values .: The decoded text ; Author ........: Stephen Podhajecki {gehossafats at netmdc. com} ; Remarks .......: Replaces escaped hex values for url encoding with ascII characters. ; Decoding based on information provided here: http://www.blooberry.com/indexdot/html/topics/urlencoding.htm ; Related .......: _URLEncode ; ========================================================= Func _URLDecode($sURL) Local $aEncodable[13]=['"',"'","<",">","\","^","[","]","`","+","$",",","#"] ;decode non-printable and space Local $sTemp = $sURL For $x = 0 to 32 $sTemp = StringReplace($sTemp,"%"&Hex($x,2),Chr($x)) Next ;decode "unsafe" For $x = 0 to UBound($aEncodable)-1 $sTemp = StringReplace($sTemp,"%"&Hex(Asc($aEncodable[$x]),2),$aEncodable[$x]) Next ;decode upper ascii and {}|~_ For $x = 123 to 255 $sTemp = StringReplace($sTemp,"%"&Hex($x,2),Chr($x)) Next ;decode % last $sTemp = StringReplace($sTemp,"%25","%") $sTemp = _ConvertEntities($sTemp) Return $sTemp EndFunc ; #FUNCTION# ===================================================================================================================== ; Description ...: _ConvertEntities ; Parameters ....: $sURL - IN - The Text to convert ; Return values .: Success - Converted string ; Author ........: Stephen Podhajecki {gehossafats at netmdc. com} ; Remarks .......: Replaces HTML escape sequences with character representation ; Based on information found here: http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php ; nbsp is changed to 32 instead of 160 ; Related .......: ; ================================================================================================================================ Func _ConvertEntities($sURL) Local $sTemp = $sUrl Local $aEntities[96][2]=[[""",34],["&",38],["<",60],[">",62],[" ",3],[" ",32] _ ,["¡",161],["¢",162],["£",163],["¤",164],["¥",165],["¦",166] _ ,["§",167],["¨",168],["©",169],["ª",170],["¬",172],["­",173] _ ,["®",174],["¯",175],["°",176],["±",177],["²",178],["³",179] _ ,["´",180],["µ",181],["¶",182],["·",183],["¸",184],["¹",185] _ ,["º",186],["»",187],["¼",188],["½",189],["¾",190],["¿",191] _ ,["À",192],["Á",193],["Ã",195],["Ä",196],["Å",197],["Æ",198] _ ,["Ç",199],["È",200],["É",201],["Ê",202],["Ì",204],["Í",205] _ ,["Î",206],["Ï",207],["Ð",208],["Ñ",209],["Ò",210],["Ó",211] _ ,["Ô",212],["Õ",213],["Ö",214],["×",215],["Ø",216],["Ù",217] _ ,["Ú",218],["Û",219],["Ü",220],["Ý",221],["Þ",222],["ß",223] _ ,["à",224],["á",225],["â",226],["ã",227],["ä",228],["å",229] _ ,["æ",230],["ç",231],["è",232],["é",233],["ê",234],["ë",235] _ ,["ì",236],["í",237],["î",238],["ï",239],["ð",240],["ñ",241] _ ,["ò",242],["ó",243],["ô",244],["õ",245],["ö",246],["÷",247] _ ,["ø",248],["ù",249],["ú",250],["û",251],["ü",252],["þ",254]] For $x = 0 to Ubound($aEntities)-1 $sTemp = StringReplace($sTemp,$aEntities[$x][0],Chr($aEntities[$x][1])) Next For $x = 32 to 255 $sTemp = StringReplace($sTemp,"&#"&$x&";",chr($x)) Next Return $sTemp EndFuncedit: shortened "====".edit: Added larger notice about displaying text.edit: Added paste buttons, and fixed multi-line problem.The GUI is just an example for the translator script and is really just to show that it works.I will add conversion of some HTML entities to their character representation soon. Done.Here's a link to download a zip with both files. Edited March 10, 2008 by eltorro Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
Achilles Posted March 7, 2008 Share Posted March 7, 2008 Nice work! It seems to work well for the testing I did. Just a complete side note about your posted code: Could you shorten the =========='s in you're _GGLTranslate.au3 'cause I had to go through 10 or something and delete about 8 ='s... My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
gseller Posted March 8, 2008 Share Posted March 8, 2008 Lovin' It, Rosettastone is awesome but this is too, and so light... (Coding that is.. ) Link to comment Share on other sites More sharing options...
eltorro Posted March 8, 2008 Author Share Posted March 8, 2008 Thanks! Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
GEOSoft Posted March 8, 2008 Share Posted March 8, 2008 It seems to work but it does have a few issues on my system. Some language pairs don't work (en|ar) Progress never runs. ( might be caused from text string being too short) Appears to be lacking unicode support (try English to Greek or Chinese) Good for most though and quite fast. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
ReFran Posted March 8, 2008 Share Posted March 8, 2008 (edited) Works quick. A button "Get from clipboard" would be handy.Here the results from testing:Problem with multiline textType some text here and click translate.This is similar to this text.result:Geben Sie Text ein und klicken Sie hier translate.This ist vergleichbar mit diesem Text.Problems with special signs:Type some text here and click translate.result:Geben Sie hier einen Text und klicken Sie auf "übersetzen.I think a statement stringReplace(..,""") can already solve this.The tool I use at the moment resides in the taskbar and if i click on it, it trys to translate direct the clipboard content.Thanks for the tool,Reinhard Edited March 8, 2008 by ReFran Link to comment Share on other sites More sharing options...
eltorro Posted March 9, 2008 Author Share Posted March 9, 2008 Works quick. A button "Get from clipboard" would be handy.Here the results from testing:Problem with multiline textresult:Problems with special signs:result:I think a statement stringReplace(..,""") can already solve this.The tool I use at the moment resides in the taskbar and if i click on it, it trys to translate direct the clipboard content.Thanks for the tool,ReinhardI added a couple of buttons to the GUI to cut and paste from the clipboard and I fixed the multi-line problem.I'll get to the entities as soon as I can. It should not be hard, there is just a few common ones. Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
ReFran Posted March 10, 2008 Share Posted March 10, 2008 I added a couple of buttons to the GUI to cut and paste from the clipboard and I fixed the multi-line problem.I'll get to the entities as soon as I can. It should not be hard, there is just a few common ones.Thanks. Now it works perfect - at least for me.Best regards, Reinhard Link to comment Share on other sites More sharing options...
eltorro Posted March 10, 2008 Author Share Posted March 10, 2008 I have added converting html entities back to their character representations. I also added a link to a zip with the files. Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
GEOSoft Posted March 10, 2008 Share Posted March 10, 2008 I have added converting html entities back to their character representations.I also added a link to a zip with the files.What about the problem with unicode? Have you looked at that yet? George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
eltorro Posted March 10, 2008 Author Share Posted March 10, 2008 What about the problem with unicode? Have you looked at that yet?Do you have Asian fonts enabled? Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
GEOSoft Posted March 10, 2008 Share Posted March 10, 2008 Do you have Asian fonts enabled?Yes and I read that in your first post but I'll have another look later. You still did a good job. Congratulations.When I look at the source for the Google page I see the same characters that were being displayed from the translator. I have another page I've been trying out for Arabic so I'll have a look at the source from when I get that far. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
eltorro Posted March 10, 2008 Author Share Posted March 10, 2008 Yes and I read that in your first post but I'll have another look later. You still did a good job. Congratulations.When I look at the source for the Google page I see the same characters that were being displayed from the translator. I have another page I've been trying out for Arabic so I'll have a look at the source from when I get that far.If you have another page that returns a better translation for arabic, then it might be possible to add that url into the script too.Please let me know. Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
yehia Posted January 16, 2009 Share Posted January 16, 2009 i have them enabled but still arabic aint working My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
boryzo Posted February 5, 2009 Share Posted February 5, 2009 Hi all, Please look at this intresting program. Google Translator Source BRs Borys *** YES I KNOW ABOUT ROSETTA STONE *** A simple language translation tool. Uses Google to do the translation. I was working on a program and I needed a way to automate translating some strings. So i whipped up a little udf to do just that. Nothing spectacular, but could be useful for others who need to do the same. I set the default language pair to translate English to Spanish because of where I live. This is easy to change though for ones needs. Some languages cannot be displayed without enabling unicode text support. Enable this in - Control Panel >> Region and Language Options>> Languages >> Install files for complex script and right to left languages (Arabic) Install files for East Asian languages.Checking both will add about 240MB to your system. The gui is just a wrapper for demo/testing. edit: added button to paste from clipboard and paste translated text to clipboard. expandcollapse popup; simple usage: ;#Include <_GGLTranslate.au3> ;~ Local $text = StringFormat("Error, object not passes in parameter 1.\n#Please check the paramters and try again.\n") ;~;============================================================================== ;~ Local $e = _URLEncode($text) ;~ Local $d = _URLDecode($e) ;~ Local $m = StringFormat("Orig: %s\nEncoded: %s\nDecoded: %s",$text,$e,$d) ;~ MsgBox(0,"Encodings",$m) ;~;============================================================================== ;~ MsgBox(0,"English to Spanish",_GoogleTranslateString($text)) ;~ MsgBox(0,"English to Dutch",_GoogleTranslateString($text,"en|nl")) ;~;============================================================================== #include <GUIConstants.au3> #Include <GuiComboBox.au3> #Include <GuiEdit.au3> #Include <user\_GGLTRanslate.au3> Local $aLangs[29]=["ar|en","zh|en","zh-CN|zh-TW","zh-TW|zh-CN","nl|en","en|ar" _ ,"en|zh-CN","en|zh-TW","en|nl","en|fr","en|de","en|el","en|it","en|ja","en|ko" _ ,"en|pt","en|ru","en|es","fr|en","fr|de","de|en","de|fr","el|en","it|en","ja|en" _ ,"ko|en","pt|en","ru|en","es|en"] Local $languages = "" & _ "Chinese to English - zh:en" & _ "|Chinese (Simplified to Traditional) - zh-CN:zh-TW" & _ "|Chinese (Traditional to Simplified) - zh-TW:zh-CN" & _ "|Dutch to English - nl:en" & _ "|English to Arabic - en:ar" & _ "|English to Chinese (Simplified) - en:zh-CN" & _ "|English to Chinese (Traditional) - en:zh-TW" & _ "|English to Dutch - en:nl" & _ "|English to French - en:fr" & _ "|English to German - en:de" & _ "|English to Greek - en:el" & _ "|English to Italian - en:it" & _ "|English to Japanese - en:ja" & _ "|English to Korean - en:ko" & _ "|English to Portuguese - en:pt" & _ "|English to Russian - en:ru" & _ "|English to Spanish - en:es" & _ "|French to English - fr:en" & _ "|French to German - fr:de" & _ "|German to English - de:en" & _ "|German to French - de:fr" & _ "|Greek to English - el:en" & _ "|Italian to English - it:en" & _ "|Japanese to English - ja:en" & _ "|Korean to English - ko:en" & _ "|Portuguese to English - pt:en" & _ "|Russian to English - ru:en" & _ "|Spanish to English - es:en" #Region ### START Koda GUI section ### Form= Global $Form1 = GUICreate("gglTranslate", 633, 363, 193, 125) Global $Edit1 = GUICtrlCreateEdit("", 10, 30, 611, 116) Global $Edit2 = GUICtrlCreateEdit("", 10, 185, 611, 116) Global $Combo1 = GUICtrlCreateCombo("Arabic to English - ar:en", 185, 155, 256, 25) GUICtrlSetData(-1,$languages,"English to Spanish - en:es") Global $Translate = GUICtrlCreateButton("Translate", 545, 150, 75, 25, 0) Global $Paste = GuiCtrlCreateButton("From Clip",450,150,75,25,0) Global $Label1 = GUICtrlCreateLabel("Text to Translate:", 10, 10, 87, 17) Global $Label2 = GUICtrlCreateLabel("Translated Text:", 10, 160, 81, 17) Global $Label3 = GUICtrlCreateLabel("Language Pair:", 100, 155, 76, 17) Global $Progress1 = GUICtrlCreateProgress(10, 340, 610, 17) Global $Cancel = GUICtrlCreateButton("Cancel", 545, 305, 75, 25, 0) Global $PasteTo = GuiCtrlCreateButton("To Clip",450,305,75,25,0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### if Not FileExists(".ggl1") Then GuiCtrlSetData($Edit1,"Type some text here and click translate.") FileWriteline(".ggl1","") EndIf $langpair = "en|es" While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Combo1 $langpair = $aLangs[_GUICtrlComboBox_GetCurSel($Combo1)] Case $Translate _TranslateWithProgress() Case $Paste Local $clip = ClipGet() if $clip <> "" Then GuiCtrlSetData($Edit1,$clip) $clip = "" ;remove the remark to automate translation on paste. ;_TranslateWithProgress() EndIf Case $PasteTo If _GuiCtrlEdit_GetTextLen($Edit2) >0 Then ClipPut(GuiCtrlRead($Edit2)) EndIf EndSwitch WEnd Func _TranslateWithProgress() Const $iSize = 512 Local $x, $iLen,$sText,$sTemp,$sTemp1,$pos,$iMsg $sText = GuiCtrlRead($Edit1) If $sText <> "" Then GuiCtrlSetData($Edit2,"") $iLen = StringLen($sText) ConsoleWrite($iLen&@lf) ; If $iLen > $iSize Then $x =1 GuiCtrlSetData($Progress1,10) While 1 If $iMsg = $Cancel Then If (MsgBox(4,"gglTranslate","Are you sure you wish to stop translating?")) = 6 Then ExitLoop EndIf EndIf $iMsg = GuiGetMsg() If $iLen > $iSize Then $sTemp = StringMid($sText,$x,$iSize) $pos = StringInstr($sTemp,@LF,0,-1) If $pos =0 Then $pos = StringInstr($sTemp," ",0,-1) If $pos = 0 Then $pos = StringLen($sTemp) $sTemp1 = StringLeft($sTemp,$pos) $x += $pos Else $sTemp1 = $sText $x += $iLen EndIf If $iMsg <> $Cancel Then $iMsg = GuiGetMsg() GuiCtrlSetData($Edit2,_GoogleTranslateString($sTemp1,$langpair,True),1) GuiCtrlSetData($Progress1,(100/$iLen)*$x) If $x >= $iLen then ExitLoop EndIf If $iMsg <> $Cancel Then $iMsg = GuiGetMsg() WEnd sleep(750) GUICtrlSetData($Progress1,0) EndIf EndFunc Save the function below as _GGLTranslate.au3 expandcollapse popup; #INDEX# ================================================= ; Title .........: _GGlTranslate ; AutoIt Version: 3.2.3++ ; Language: English ; Description ...: Translates text between languages using Google web api. ; Author, Stephen Podhajecki gehossafats at netmdc dot com. ; ========================================================= ;; simple usage: ;~#Include <_GGLTranslate.au3> ;~ Local $text = StringFormat("Error, object not passes in parameter 1.\n#Please check the paramters and try again.\n") ;~ ; ========================================================= ;~ Local $e = _URLEncode($text) ;~ Local $d = _URLDecode($e) ;~ Local $m = StringFormat("Orig: %s\nEncoded: %s\nDecoded: %s",$text,$e,$d) ;~ MsgBox(0,"Encodings",$m) ;~ ; ========================================================= ;~ MsgBox(0,"English to Spanish",_GoogleTranslateString($text)) ;~ MsgBox(0,"English to Dutch",_GoogleTranslateString($text,"en|nl")) ;~ ; ========================================================= ; #FUNCTION# ============================================== ; Description ...: Uses Google to translate a string into another language ; Parameters ....: $sText - IN - The text to translate. ; $sLangPair - IN/OPTIONAL - The language pair separated by a pipe. ; $bEncodeURL - IN/OPTIONAL - Escape "illegal" characters from the text ; Return values .: On Success - The translated string. ; On Failure - The original string and @error set to 1 ; Author ........: Stephen Podhajecki {gehossafats at netmdc. com} ; Remarks .......: Requires internet access, ; Defaults to en|es English to Spanish. ; Defaults to False for URL encoding the text for the web. ; Other possible lang pairs are: ; |Arabic to English - ar|en ; |Chinese to English - zh|en ; |Chinese (Simplified to Traditional) - zh-CN|zh-TW ; |Chinese (Traditional to Simplified) - zh-TW|zh-CN ; |Dutch to English - nl|en ; |English to Arabic - en|ar ; |English to Chinese (Simplified) - en|zh-CN ; |English to Chinese (Traditional) - en|zh-TW ; |English to Dutch - en|nl ; |English to French - en|fr ; |English to German - en|de ; |English to Greek - en|el ; |English to Italian - en|it ; |English to Japanese - en|ja ; |English to Korean - en|ko ; |English to Portuguese - en|pt ; |English to Russian - en|ru ; |English to Spanish - en|es ; |French to English - fr|en ; |French to German - fr|de ; |German to English - de|en ; |German to French - de|fr ; |Greek to English - el|en ; |Italian to English - it|en ; |Japanese to English - ja|en ; |Korean to English - ko|en ; |Portuguese to English - pt|en ; |Russian to English - ru|en ; |Spanish to English - es|en ; Related .......: ; ========================================================= Func _GoogleTranslateString($sText,$sLangPair= -1,$bEncodeURL=False ) Local $url, $sTemp, $aTranslated, $sTranslated If $sLangPair = -1 Then $sLangPair = "en|es" $regex= '(?:<(?i)DIV id="?result_box"? dir="?ltr"?>)(.*?)(?:</(?i)DIV>)' $sTemp = $sText If $bEncodeURL Then $sTemp = _URLEncode($sText) EndIf $url =StringFormat('http://google.com/translate_t?langpair=%s&text=%s',$sLangPair,$sTemp) If(InetGet($url,".temp.html",1)) Then $aTranslated = StringRegExp(StringStripWS(FileRead(".temp.html"),7),$regex,3) If IsArray($aTranslated) Then FileDelete(".temp.html") $sTranslated = StringReplace($aTranslated[0],Chr(160),Chr(32)) $sTranslated = StringRegExpReplace($sTranslated,"((\s|\n)?<(?i)br)(.*?)(>)(\s)",@CRLF) ;$sTranslated = StringReplace($aTranslated[0],"<br>",@CRLF) If $bEncodeURL Then Return _URLDecode($sTranslated) EndIf Return $sTranslated EndIf EndIf Return SetError(1,0,$sText) EndFunc ; #FUNCTION# ============================================== ; Description ...: Encodes text for use in URLs ; Parameters ....: $sURL - IN - The text to encode ; Return values .: The encoded text ; Author ........: Stephen Podhajecki {gehossafats at netmdc. com} ; Remarks .......: Replaces defined characters with escaped hex values for url encoding. ; Encoding based on information provided here: http://www.blooberry.com/indexdot/html/topics/urlencoding.htm ; Related .......: _URLDecode ; ======================================================== Func _URLEncode($sURL) Local $aEncodable[13]=['"',"'","<",">","\","^","[","]","`","+","$",",","#"] ;encode % first because encoding will add more % to the url Local $sTemp = StringReplace($sURL,"%","%25") ;encode non-printable and space For $x = 0 to 32 $sTemp = StringReplace($sTemp,Chr($x),"%"&Hex($x,2)) Next ;encode "unsafe" For $x = 0 to UBound($aEncodable)-1 $sTemp = StringReplace($sTemp,$aEncodable[$x],"%"&Hex(Asc($aEncodable[$x]),2)) Next ;encode upper ascii and {}|~_ For $x = 123 to 255 $sTemp = StringReplace($sTemp,Chr($x),"%"&Hex($x,2)) Next Return $sTemp EndFunc ; #FUNCTION# ============================================== ; Description ...: Decodeds text for use in URLs ; Parameters ....: $sURL - IN - The text to decode ; Return values .: The decoded text ; Author ........: Stephen Podhajecki {gehossafats at netmdc. com} ; Remarks .......: Replaces escaped hex values for url encoding with ascII characters. ; Decoding based on information provided here: http://www.blooberry.com/indexdot/html/topics/urlencoding.htm ; Related .......: _URLEncode ; ========================================================= Func _URLDecode($sURL) Local $aEncodable[13]=['"',"'","<",">","\","^","[","]","`","+","$",",","#"] ;decode non-printable and space Local $sTemp = $sURL For $x = 0 to 32 $sTemp = StringReplace($sTemp,"%"&Hex($x,2),Chr($x)) Next ;decode "unsafe" For $x = 0 to UBound($aEncodable)-1 $sTemp = StringReplace($sTemp,"%"&Hex(Asc($aEncodable[$x]),2),$aEncodable[$x]) Next ;decode upper ascii and {}|~_ For $x = 123 to 255 $sTemp = StringReplace($sTemp,"%"&Hex($x,2),Chr($x)) Next ;decode % last $sTemp = StringReplace($sTemp,"%25","%") $sTemp = _ConvertEntities($sTemp) Return $sTemp EndFunc ; #FUNCTION# ===================================================================================================================== ; Description ...: _ConvertEntities ; Parameters ....: $sURL - IN - The Text to convert ; Return values .: Success - Converted string ; Author ........: Stephen Podhajecki {gehossafats at netmdc. com} ; Remarks .......: Replaces HTML escape sequences with character representation ; Based on information found here: http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php ; nbsp is changed to 32 instead of 160 ; Related .......: ; ================================================================================================================================ Func _ConvertEntities($sURL) Local $sTemp = $sUrl Local $aEntities[96][2]=[[""",34],["&",38],["<",60],[">",62],[" ",3],[" ",32] _ ,["¡",161],["¢",162],["£",163],["¤",164],["¥",165],["¦",166] _ ,["§",167],["¨",168],["©",169],["ª",170],["¬",172],["­",173] _ ,["®",174],["¯",175],["°",176],["±",177],["²",178],["³",179] _ ,["´",180],["µ",181],["¶",182],["·",183],["¸",184],["¹",185] _ ,["º",186],["»",187],["¼",188],["½",189],["¾",190],["¿",191] _ ,["À",192],["Á",193],["Ã",195],["Ä",196],["Å",197],["Æ",198] _ ,["Ç",199],["È",200],["É",201],["Ê",202],["Ì",204],["Í",205] _ ,["Î",206],["Ï",207],["Ð",208],["Ñ",209],["Ò",210],["Ó",211] _ ,["Ô",212],["Õ",213],["Ö",214],["×",215],["Ø",216],["Ù",217] _ ,["Ú",218],["Û",219],["Ü",220],["Ý",221],["Þ",222],["ß",223] _ ,["à",224],["á",225],["â",226],["ã",227],["ä",228],["å",229] _ ,["æ",230],["ç",231],["è",232],["é",233],["ê",234],["ë",235] _ ,["ì",236],["í",237],["î",238],["ï",239],["ð",240],["ñ",241] _ ,["ò",242],["ó",243],["ô",244],["õ",245],["ö",246],["÷",247] _ ,["ø",248],["ù",249],["ú",250],["û",251],["ü",252],["þ",254]] For $x = 0 to Ubound($aEntities)-1 $sTemp = StringReplace($sTemp,$aEntities[$x][0],Chr($aEntities[$x][1])) Next For $x = 32 to 255 $sTemp = StringReplace($sTemp,"&#"&$x&";",chr($x)) Next Return $sTemp EndFunc edit: shortened "====". edit: Added larger notice about displaying text. edit: Added paste buttons, and fixed multi-line problem. The GUI is just an example for the translator script and is really just to show that it works. I will add conversion of some HTML entities to their character representation soon. Done. Here's a link to download a zip with both files. Link to comment Share on other sites More sharing options...
akurakkauaaa Posted January 16, 2012 Share Posted January 16, 2012 (edited) translator: expandcollapse popup#include <inet.au3> Global $language = '' ;$language &= "auto Detect Language|" $language &= "af Afrikaans|" $language &= "sq Albanian|" $language &= "ar Arabic|" $language &= "hy Armenian|" $language &= "az Azeri|" $language &= "eu Basque|" $language &= "bn Bengali|" $language &= "be Belarusian|" $language &= "bg Bulgarian|" $language &= "zh CN Chinese|" $language &= "hr Croatian|" $language &= "cs Czech|" $language &= "da Danish|" $language &= "en English|" $language &= "et Estonian|" $language &= "tl Filipino|" $language &= "fi Finnish|" $language &= "fr French|" $language &= "gl Galician|" $language &= "de German|" $language &= "el Greek|" $language &= "ka Georgian|" $language &= "gu Gujarati|" $language &= "iw Hebrew|" $language &= "hi Hindi|" $language &= "hu Hungarian|" $language &= "id Indonesian|" $language &= "it Italian|" $language &= "ga Irish|" $language &= "is Icelandic|" $language &= "ja Japanese|" $language &= "yi Yiddish|" $language &= "kn Kannada|" $language &= "ca Catalan|" $language &= "ko Korean|" $language &= "ht Haitian Creole|" $language &= "lt Lithuanian|" $language &= "la Latin|" $language &= "lv Latvian|" $language &= "mk Macedonian|" $language &= "ms Malay|" $language &= "mt Maltese|" $language &= "nl Netherlands|" $language &= "no Norwegian|" $language &= "fa Persian|" $language &= "pl Polish|" $language &= "pt Portuguese|" $language &= "ru Russian|" $language &= "ro Romanian|" $language &= "sr Serbian|" $language &= "sk Slovak|" $language &= "sl Slovenian|" $language &= "sw Swahili|" $language &= "sv Swedish|" $language &= "es Spanish|" $language &= "th Thai|" $language &= "ta Tamil|" $language &= "te Telugu|" $language &= "tr Turkish|" $language &= "uk Ukrainian|" $language &= "ur Urdu|" $language &= "cy Welsh|" $language &= "vi Vietnamese" Global $string = "you like bananas?" Global $trans Global $arrayLang = StringSplit($language, "|", 3) For $i = 0 To UBound($arrayLang) - 1 $trans = myGoogleTranslate($string, "en", $arrayLang[$i], "en") ConsoleWrite($arrayLang[$i] & ' = ' & $trans & @CRLF) Next ConsoleWrite(@CRLF) ConsoleWrite(myGoogleTranslate("kociak", "PL", "EN", "EN") & @CRLF) Exit #region Google Translate Func myGoogleTranslate($sText, $sTo = "en", $sFrom = "pl", $sCode = "en") $sTo = StringRegExpReplace($sTo, '(\w+)|(.*)', '\1') $sFrom = StringRegExpReplace($sFrom, '(\w+)|(.*)', '\1') $sCode = StringRegExpReplace($sCode, '(\w+)|(.*)', '\1') If (Not $sText) Or (Not $sTo) Or (Not $sFrom) Or (Not $sCode) Then Return SetError(1, 0, 0) If StringRegExpReplace($sText, '([a-zA-Z0-9]+)', '') Then $sText = StringToBinary($sText) $sText = StringTrimLeft($sText, 2) $sText = StringRegExpReplace($sText, '(.{2})', '%\1') EndIf Local $GoogleURL = 'http://translate.google.com/translate_a/t?client=t&text=' & $sText & '&hl=' & $sCode & '&sl=' & $sTo & '&tl=' & $sFrom & '&multires=1&ssel=0&tsel=0&sc=1' ;ConsoleWrite($GoogleURL & @CRLF) Local $sSource = _INetGetSource($GoogleURL) ;If @error Then ; Local $TempFileDir = @ScriptDir & "\t.js" ; Local $hDownload = InetGet($GoogleURL, $TempFileDir, 1, 1) ; Local $begin = TimerInit() ; Do ; Until (InetGetInfo($hDownload, 2)) Or (TimerDiff($begin) >= 4000) ; InetClose($hDownload) ; $sSource = FileRead($TempFileDir) ; FileDelete($TempFileDir) ;EndIf ;ConsoleWrite($sSource & @CRLF) If (Not $sSource) Then Return SetError(2, 0, 0) Local $s_saveSource = $sSource Local $sPattern = '],,"' & $sTo & '",,[' $sSource = StringLeft($sSource, StringInStr($sSource, $sPattern)) If $sSource Then ; jesli to cale zdanie $sSource = StringRegExpReplace($sSource, '[[]["](.*?)["][,]["]|(.*?)', '\1') $sSource = myGoogleTranslate_Hex_to_ChrW($sSource) Else ; jesli to pojedynczy wyraz $sPattern = '],"' & $sTo & '",,[' $sSource = StringLeft($s_saveSource, StringInStr($s_saveSource, $sPattern)) $sSource = StringRegExpReplace($sSource, '[,][[][[]?(.*?)[[](.*?)[]]|(.*?)', '\1\2') $sSource = myGoogleTranslate_Hex_to_ChrW($sSource) $sSource = StringReplace($sSource, '","', @CRLF & @TAB) $sSource = StringReplace($sSource, '"', @CRLF) EndIf $sSource = StringReplace($sSource, '\"', '"') $sSource = StringFormat($sSource) If (Not $sSource) Then Return SetError(3, 0, 0) Return $sSource EndFunc ;==>myGoogleTranslate Func myGoogleTranslate_Hex_to_ChrW($sText) Local $searchHex, $aText Do $searchHex = StringInStr($sText, '\u') If $searchHex Then $aText = StringRegExp($sText, '(.{' & ($searchHex - 1) & '})(.{2})(.{4})(.*)', 3) ;_ArrayDisplay($aText) If IsArray($aText) Then $sText = $aText[0] & ChrW(Dec($aText[2])) & $aText[3] EndIf EndIf Until $searchHex <= 0 Return $sText EndFunc ;==>myGoogleTranslate_Hex_to_ChrW #endregion Google Translate Edited January 16, 2012 by akurakkauaaa my crap: myFileListToArray_AllFiles, SciTE Helper, myImageSearch Link to comment Share on other sites More sharing options...
tele123 Posted January 29, 2012 Share Posted January 29, 2012 (edited) url decoding working ?Because , I do not understand , how copy this : ą, ń, ę, ż, dż, ź, ó, ł, ś, ćfrom google translatorWhen I copy text to autoit , I have ±, ę, ż, dż, Ľ, ó, ł, ¶, ć, Edited January 29, 2012 by tele123 Link to comment Share on other sites More sharing options...
slawekc Posted February 6, 2012 Share Posted February 6, 2012 @akurakkauaaa: great piece of code! url decoding working ? Because , I do not understand , how copy this : ą, ń, ę, ż, dż, ź, ó, ł, ś, ć from google translator When I copy text to autoit , I have ±, ę, ż, dż, Ľ, ó, ł, ¶, ć, The text is encoded in ISO8859-2. If you want, you can use the following function to get the text in ANSI (works only for Polish): Func ISOtoANSI($sText) ; http://en.wikipedia.org/wiki/Polish_code_pages $sText = StringReplace($sText, Chr(Dec("A1")), "Ą") $sText = StringReplace($sText, Chr(Dec("A6")), "Ś") $sText = StringReplace($sText, Chr(Dec("AC")), "Ź") $sText = StringReplace($sText, Chr(Dec("B1")), "ą") $sText = StringReplace($sText, Chr(Dec("B6")), "ś") $sText = StringReplace($sText, Chr(Dec("BC")), "ź") Return $sText EndFunc ;==>ISOtoANSI tele123 1 Link to comment Share on other sites More sharing options...
tele123 Posted February 14, 2012 Share Posted February 14, 2012 (edited) hmm....xB9 (utf-8)= ą ( ANSI ) = b9 (hex)xE6 (utf-8)= ć ( ANSI ) = e6 (hex )ą, ń, ę, ż, dż, ź, ó, ł, ś, ć Ä…, Ĺ„, Ä™, ĹĽ, dĹĽ, Ĺş, Ăł, Ĺ‚, Ĺ›, ć, --> utf-8 to ANSIxB9, xF1, xEA, xBF, dxBF, x9F, xF3, xB3, x9C, xE6 --> ANSI to utf-8Ok , now I know , I must change Format utf-8 to ANSI in notepad++ And I use Windows-1250 file , but from url ISO8859-2 is similar , but example, greatly helped.Thanks slawekc I have .txt in fiile<v>6, ą, ń, ę, ż, dż, ź, ó, ł, ś, ć</v><v>6, Ą, Ń, Ę, Ż DŻ, Ź, ó, Ł, Ś, Ć</v>from google<v>6, a, n, ę, ż, dż, ź, ó, ł, ś, ć</v><v>6, A, N, E, Z DZ, Z, O, L, S, C</v>I don't know...no matter, now it is a little better Edited February 15, 2012 by tele123 Link to comment Share on other sites More sharing options...
Ontosy Posted October 14, 2012 Share Posted October 14, 2012 (edited) I use this function to translate to Georgian KA. But when i use in GUICtrlCreateEdit: GUICtrlSetData($cText, $Translated) not see strange characters. Do it is possible to solve? i must to enable unicode text support in Windows control pannel? Edited October 14, 2012 by Ontosy Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now