<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Translating Text</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2004/04/30/translating-text/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2004/04/30/translating-text/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Tue, 07 Feb 2012 23:32:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: stedawa</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/30/translating-text/#comment-28854</link>
		<dc:creator>stedawa</dc:creator>
		<pubDate>Thu, 22 Nov 2007 05:59:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=512#comment-28854</guid>
		<description>&lt;p&gt;Exactly what do I save the file as, in what directory do I place it, and how do I &quot;call&quot; it?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Exactly what do I save the file as, in what directory do I place it, and how do I &#8220;call&#8221; it?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: z3nny</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/30/translating-text/#comment-28811</link>
		<dc:creator>z3nny</dc:creator>
		<pubDate>Tue, 20 Nov 2007 00:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=512#comment-28811</guid>
		<description>&lt;p&gt;CAN YOU HELP ME..&lt;/p&gt;
&lt;p&gt;WHATS THE SYNTAX OF THE FUNCTION??&lt;/p&gt;
&lt;p&gt;THE STRUCTURE OF THE WEB PAGE STILL THE SAME??&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>CAN YOU HELP ME..</p>
<p>WHATS THE SYNTAX OF THE FUNCTION??</p>
<p>THE STRUCTURE OF THE WEB PAGE STILL THE SAME??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jake Marx</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/30/translating-text/#comment-1445</link>
		<dc:creator>Jake Marx</dc:creator>
		<pubDate>Fri, 07 May 2004 02:10:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=512#comment-1445</guid>
		<description>&lt;p&gt;Dick,&lt;/p&gt;
&lt;p&gt;Someone asked about this in the excel programming NG about six weeks ago.  Here is &lt;a href=&quot;http://groups.google.com/groups?hl=en&amp;lr=&amp;ie=UTF-8&amp;oe=UTF-8&amp;selm=OOJZLDA7DHA.488%40TK2MSFTNGP12.phx.gbl&amp;rnum=2&quot;&gt;my reply&lt;/a&gt; to that post.&lt;/p&gt;
&lt;p&gt;However, it looks like Altavista has changed their page structure a bit since then.  Here&#039;s an updated version, which utilizes the XMLHTTP object and should be quite a bit faster than Automating IE:&lt;/p&gt;
&lt;p&gt;Public Enum TranslateLanguages&lt;br&gt;
&#160;&#160;&#160;Eng_Fren = 1&lt;br&gt;
&#160;&#160;&#160;Eng_Ger = 2&lt;br&gt;
&#160;&#160;&#160;Eng_Ita = 3&lt;br&gt;
&#160;&#160;&#160;Eng_Port = 4&lt;br&gt;
&#160;&#160;&#160;Eng_Span = 5&lt;br&gt;
&#160;&#160;&#160;Fren_Eng = 6&lt;br&gt;
&#160;&#160;&#160;Fren_Ger = 7&lt;br&gt;
&#160;&#160;&#160;Ger_Eng = 8&lt;br&gt;
&#160;&#160;&#160;Ger_Fren = 9&lt;br&gt;
&#160;&#160;&#160;Ita_Eng = 10&lt;br&gt;
&#160;&#160;&#160;Port_Eng = 11&lt;br&gt;
&#160;&#160;&#160;Span_Eng = 12&lt;br&gt;
End Enum&lt;/p&gt;
&lt;p&gt;Public Function gsTranslateText(rsTextToTranslate, _&lt;br&gt;
 rMode As TranslateLanguages) As String&lt;br&gt;
&#160;&#160;&#160;Dim xml As XMLHTTP40&lt;br&gt;
&#160;&#160;&#160;Dim abytPostData() As Byte&lt;br&gt;
&#160;&#160;&#160;Dim sMode As String&lt;br&gt;
&#160;&#160;&#160;Dim sResponse As String&lt;br&gt;
&#160;&#160;&#160;Dim nStartPos As Integer&lt;br&gt;
&#160;&#160;&#160;Dim nEndPos As Integer&lt;/p&gt;
&lt;p&gt;&#160;&#160;&#160;Select Case rMode&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;Case Eng_Fren&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sMode = &quot;en_fr&quot;&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;Case Eng_Ger&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sMode = &quot;en_de&quot;&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;Case Eng_Ita&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sMode = &quot;en_it&quot;&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;Case Eng_Port&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sMode = &quot;en_pt&quot;&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;Case Eng_Span&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sMode = &quot;en_es&quot;&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;Case Fren_Eng&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sMode = &quot;fr_en&quot;&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;Case Fren_Ger&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sMode = &quot;fr_de&quot;&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;Case Ger_Eng&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sMode = &quot;de_en&quot;&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;Case Ger_Fren&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sMode = &quot;de_fr&quot;&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;Case Ita_Eng&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sMode = &quot;it_en&quot;&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;Case Port_Eng&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sMode = &quot;pt_en&quot;&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;Case Span_Eng&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;sMode = &quot;es_en&quot;&lt;br&gt;
&#160;&#160;&#160;End Select&lt;/p&gt;
&lt;p&gt;&#160;&#160;&#160;abytPostData = StrConv(&quot;doit=done&amp;intl=1? _&lt;br&gt;
&#160;&#160;&#160; &amp; &quot;&amp;tt=urltext&amp;lp=&quot; &amp; sMode &amp; &quot;&amp;urltext=&quot; _&lt;br&gt;
&#160;&#160;&#160; &amp; rsTextToTranslate, vbFromUnicode)&lt;/p&gt;
&lt;p&gt;&#160;&#160;&#160;Set xml = New XMLHTTP40&lt;br&gt;
&#160;&#160;&#160;With xml&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;.Open &quot;POST&quot;, _&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160; &quot;http://babelfish.altavista.com/babelfish/tr&quot;&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;.setRequestHeader &quot;Content-Type&quot;, _&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160; &quot;application/x-www-form-urlencoded&quot;&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;.send abytPostData&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;sResponse = .responseText&lt;br&gt;
&#160;&#160;&#160;End With&lt;br&gt;
&#160;&#160;&#160;&lt;br&gt;
&#160;&#160;&#160;&#039;/ find translation&lt;br&gt;
&#160;&#160;&#160;nStartPos = InStr(1, sResponse, &quot;name=&quot;&quot;q&quot;&quot;&quot;, vbTextCompare)&lt;br&gt;
&#160;&#160;&#160;If nStartPos Then&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;nStartPos = nStartPos + 16&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;nEndPos = InStr(nStartPos, sResponse, _&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160; &quot;&quot;&quot;&quot;, vbTextCompare) - 1&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;If nEndPos &gt;= nStartPos Then gsTranslateText = _&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160; Mid$(sResponse, nStartPos, nEndPos - _&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160; nStartPos + 1)&lt;br&gt;
&#160;&#160;&#160;End If&lt;/p&gt;
&lt;p&gt;&#160;&#160;&#160;Set xml = Nothing&lt;br&gt;
End Function&lt;/p&gt;
&lt;p&gt;You should be able to utilize the XMLHTTP object with the Systran URL in your example if you&#039;d like to test it out.  [note: the above code requires a reference to the Microsoft XML v4.0 library]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Dick,</p>
<p>Someone asked about this in the excel programming NG about six weeks ago.  Here is <a href="http://groups.google.com/groups?hl=en&amp;lr=&amp;ie=UTF-8&amp;oe=UTF-8&amp;selm=OOJZLDA7DHA.488%40TK2MSFTNGP12.phx.gbl&amp;rnum=2">my reply</a> to that post.</p>
<p>However, it looks like Altavista has changed their page structure a bit since then.  Here&#8217;s an updated version, which utilizes the XMLHTTP object and should be quite a bit faster than Automating IE:</p>
<p>Public Enum TranslateLanguages<br />
&nbsp;&nbsp;&nbsp;Eng_Fren = 1<br />
&nbsp;&nbsp;&nbsp;Eng_Ger = 2<br />
&nbsp;&nbsp;&nbsp;Eng_Ita = 3<br />
&nbsp;&nbsp;&nbsp;Eng_Port = 4<br />
&nbsp;&nbsp;&nbsp;Eng_Span = 5<br />
&nbsp;&nbsp;&nbsp;Fren_Eng = 6<br />
&nbsp;&nbsp;&nbsp;Fren_Ger = 7<br />
&nbsp;&nbsp;&nbsp;Ger_Eng = 8<br />
&nbsp;&nbsp;&nbsp;Ger_Fren = 9<br />
&nbsp;&nbsp;&nbsp;Ita_Eng = 10<br />
&nbsp;&nbsp;&nbsp;Port_Eng = 11<br />
&nbsp;&nbsp;&nbsp;Span_Eng = 12<br />
End Enum</p>
<p>Public Function gsTranslateText(rsTextToTranslate, _<br />
 rMode As TranslateLanguages) As String<br />
&nbsp;&nbsp;&nbsp;Dim xml As XMLHTTP40<br />
&nbsp;&nbsp;&nbsp;Dim abytPostData() As Byte<br />
&nbsp;&nbsp;&nbsp;Dim sMode As String<br />
&nbsp;&nbsp;&nbsp;Dim sResponse As String<br />
&nbsp;&nbsp;&nbsp;Dim nStartPos As Integer<br />
&nbsp;&nbsp;&nbsp;Dim nEndPos As Integer</p>
<p>&nbsp;&nbsp;&nbsp;Select Case rMode<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case Eng_Fren<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sMode = &#8220;en_fr&#8221;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case Eng_Ger<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sMode = &#8220;en_de&#8221;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case Eng_Ita<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sMode = &#8220;en_it&#8221;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case Eng_Port<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sMode = &#8220;en_pt&#8221;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case Eng_Span<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sMode = &#8220;en_es&#8221;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case Fren_Eng<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sMode = &#8220;fr_en&#8221;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case Fren_Ger<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sMode = &#8220;fr_de&#8221;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case Ger_Eng<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sMode = &#8220;de_en&#8221;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case Ger_Fren<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sMode = &#8220;de_fr&#8221;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case Ita_Eng<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sMode = &#8220;it_en&#8221;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case Port_Eng<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sMode = &#8220;pt_en&#8221;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case Span_Eng<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sMode = &#8220;es_en&#8221;<br />
&nbsp;&nbsp;&nbsp;End Select</p>
<p>&nbsp;&nbsp;&nbsp;abytPostData = StrConv(&#8220;doit=done&amp;intl=1? _<br />
&nbsp;&nbsp;&nbsp; &amp; &#8220;&amp;tt=urltext&amp;lp=&#8221; &amp; sMode &amp; &#8220;&amp;urltext=&#8221; _<br />
&nbsp;&nbsp;&nbsp; &amp; rsTextToTranslate, vbFromUnicode)</p>
<p>&nbsp;&nbsp;&nbsp;Set xml = New XMLHTTP40<br />
&nbsp;&nbsp;&nbsp;With xml<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Open &#8220;POST&#8221;, _<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;http://babelfish.altavista.com/babelfish/tr&#8221;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.setRequestHeader &#8220;Content-Type&#8221;, _<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;application/x-www-form-urlencoded&#8221;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.send abytPostData<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sResponse = .responseText<br />
&nbsp;&nbsp;&nbsp;End With<br />
&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&#8217;/ find translation<br />
&nbsp;&nbsp;&nbsp;nStartPos = InStr(1, sResponse, &#8220;name=&#8221;"q&#8221;"&#8221;, vbTextCompare)<br />
&nbsp;&nbsp;&nbsp;If nStartPos Then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nStartPos = nStartPos + 16<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nEndPos = InStr(nStartPos, sResponse, _<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;&#8221;"&#8221;, vbTextCompare) &#8211; 1<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If nEndPos &gt;= nStartPos Then gsTranslateText = _<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mid$(sResponse, nStartPos, nEndPos &#8211; _<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nStartPos + 1)<br />
&nbsp;&nbsp;&nbsp;End If</p>
<p>&nbsp;&nbsp;&nbsp;Set xml = Nothing<br />
End Function</p>
<p>You should be able to utilize the XMLHTTP object with the Systran URL in your example if you&#8217;d like to test it out.  [note: the above code requires a reference to the Microsoft XML v4.0 library]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/30/translating-text/#comment-1444</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Sat, 01 May 2004 11:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=512#comment-1444</guid>
		<description>&lt;p&gt;Dick, I got a similar request, asking me how to translate using Excel. Maybe it was from the same guy. In any case, I didn&#039;t know it was possible to combine IE with Excel to do an automatic translation. This is indeed a useful bit of code.&lt;/p&gt;
&lt;p&gt;Regarding machine translation, I&#039;ve notice some sites are more accurate than others when dealing with specific languages, so I am wondering which part of your code I would need to change to a different site.&lt;/p&gt;
&lt;p&gt;For example, this is a specialist translation site for English and Japanese.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.csse.monash.edu.au/cgi-bin/cgiwrap/jwb/wwwjdic?9T&quot; rel=&quot;nofollow&quot;&gt;http://www.csse.monash.edu.au/cgi-bin/cgiwrap/jwb/wwwjdic?9T&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regarding legality, I&#039;m no expert either, but I figure these translation sites are free to use anyway, so theoretically there shouldn&#039;t be any problem. (On the other hand, some sites do try to push their translation software so they might get a little upset)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Dick, I got a similar request, asking me how to translate using Excel. Maybe it was from the same guy. In any case, I didn&#8217;t know it was possible to combine IE with Excel to do an automatic translation. This is indeed a useful bit of code.</p>
<p>Regarding machine translation, I&#8217;ve notice some sites are more accurate than others when dealing with specific languages, so I am wondering which part of your code I would need to change to a different site.</p>
<p>For example, this is a specialist translation site for English and Japanese.</p>
<p><a href="http://www.csse.monash.edu.au/cgi-bin/cgiwrap/jwb/wwwjdic?9T" rel="nofollow">http://www.csse.monash.edu.au/cgi-bin/cgiwrap/jwb/wwwjdic?9T</a></p>
<p>Regarding legality, I&#8217;m no expert either, but I figure these translation sites are free to use anyway, so theoretically there shouldn&#8217;t be any problem. (On the other hand, some sites do try to push their translation software so they might get a little upset)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

