Adding Google Dictionary to Word
Thread poster: Shouguang Cao

Shouguang Cao
China
Local time: 11:20
Member (2007)
English to Chinese
+ ...
Oct 26, 2009

Does anyone use Google Dictionary?

www.google.com/dictionary


Google Dictionary is monolingual and bilingual dictionary that supports many many language pairs. I found the English Chinese dictionary is very useful, especially the "Web translations" section where quite extensive possibilities of translations are provided.


I have made a Microsoft macro that adds Google Dictionary to Microsoft Word. With this macro, you can select a word or phrase, and then press CTRL+ALT+D to check it in Google Dictionary.

dallascao.com/en/2009/10/google-dictionary-for-word-gd4word/

The download file is a .exe automated windows installer. Run it to install and everything is ready. This application is a freeware.





In case you want to do the coding yourself, you can:


In Word 2003 and under,

Go to Tools-->Macros--->Visual Basic

Right click on "Normal", and choose "Insert"--->"Module"


Paste the following code to the newly inserted module.


'code start

Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Sub Gdictionary()


Dim SLan As String
Dim TLan As String
Dim SText As String
Dim Gurl As String

SLan = "en"
TLan = "zh-CN"
SText = VBA.Trim(VBA.Replace(Selection.Text, Chr(13), ""))

Gurl = "http://www.google.com/dictionary?langpair=" + SLan + "|" + TLan + "&q=" + SText + "&hl=en&aq=f"

Debug.Print Gurl

ShellExecute 0&, vbNullString, Gurl, vbNullString, vbNullString, vbNormalFocus

End Sub

'code end


Then you can assign a keyboard shortcut to the macro: Gdictionary().

This code works when the source language uses ASCII characters only. If you want to make it work with pairs like Chinese to English, you will need to utf-8 encode your source text string.


"en", "zh-CN" are shortcodes for the source language and the target language. You need to change them to your pair.

Google language short codes:

auto=Auto Detect,af=Afrikaans,sq=Albanian,ar=Arabic,be=Belarusian,bg=Bulgarian,ca=Catalan,zh-CN=Chinese (Simplified),zh-TW=Chinese (Traditional),hr=Croatian,cs=Czech,da=Danish,nl=Dutch,en=English,et=Estonian,tl=Filipino,fi=Finnish,fr=French,gl=Galician,de=German,el=Greek,iw=Hebrew,hi=Hindi,hu=Hungarian,is=Icelandic,id=Indonesian,ga=Irish,it=Italian,ja=Japanese,ko=Korean,lv=Latvian,lt=Lithuanian,mk=Macedonian,ms=Malay,mt=Maltese,no=Norwegian,fa=Persian,pl=Polish,pt=Portuguese,ro=Romanian,ru=Russian,sr=Serbian,sk=Slovak,sl=Slovenian,es=Spanish,sw=Swahili,sv=Swedish,th=Thai,tr=Turkish,uk=Ukrainian,vi=Vietnamese,cy=Welsh,yi=Yiddish





[Edited at 2009-10-26 16:48 GMT]


Direct link Reply with quote
 

Hepburn  Identity Verified
France
Local time: 04:20
English to French
+ ...
Excellent but rather tricky to set up... Oct 27, 2009

Thanks for this idea which sounds brilliant for clever people. As for me I can barely manage the simplest of macros and wish you could come over to my side of France and attend to this for me. How about it? In exchange I would tell you and show you all there is to know about the Basque country...


Claudette


Direct link Reply with quote
 

Sushan Harshe
India
Local time: 08:50
English to Hindi
+ ...
Gr8 Oct 27, 2009

Nice tool Man!

Direct link Reply with quote
 

Fabio Said  Identity Verified
Germany
Local time: 04:20
Member (2008)
German to Portuguese
+ ...
Thanks a lot! Oct 27, 2009

Thanks a lot for the macro and for your generosity in sharing it with us. I posted your macro on my translation blog for my Portuguese-speaking audience and, of course, credited it to you. I'm sure many other translators will find your idea as useful as I did. Here's the link to my blog post:

http://fidusinterpres.com/?p=4194



Direct link Reply with quote
 

Shouguang Cao
China
Local time: 11:20
Member (2007)
English to Chinese
+ ...
TOPIC STARTER
France Oct 27, 2009

How I wish I could be there in France! Thank you so much for your hospitality.

Don't be intimidated by the code Claudette. I have made an installer that will make everything ready for you. Just download it and run it to install once, then the CTRL+ALT+D command will be automatically added to your Word.



Dallas

[Edited at 2009-10-27 13:11 GMT]


Direct link Reply with quote
 

Luca Tutino  Identity Verified
Italy
Local time: 22:20
Member (2002)
English to Italian
+ ...
Thank you! Oct 27, 2009

I have implemented it for EN>IT and NL-NL, and it works fine.
I have also learned something about VB.
Thank you Dallas!
Luca


Direct link Reply with quote
 

Shouguang Cao
China
Local time: 11:20
Member (2007)
English to Chinese
+ ...
TOPIC STARTER
You are welcome! Oct 27, 2009

Luca Tutino wrote:

I have implemented it for EN>IT and NL-NL, and it works fine.
I have also learned something about VB.
Thank you Dallas!
Luca


You are welcome Luca. The next thing is to get used to the shortcuts and move from the old habit of checking a separate dictionary application to the new one of hitting a shortcut.


Direct link Reply with quote
 

Patricia Rosas  Identity Verified
United States
Local time: 20:20
Spanish to English
+ ...
thank you! Oct 27, 2009

Dallas,

I've hardly used VB but want to learn more. I'm on a deadline this week but will return to this thread when I have some spare time and try creating the macro.

Thank you for your generosity in sharing this information!

Patricia


Direct link Reply with quote
 

Fernando Toledo  Identity Verified
Germany
Local time: 04:20
German to Spanish
Word without VBA Oct 28, 2009

For people using a actual Word (without VBA) I recommend to use "Answer".

There are different add-ons, like for example:

http://www.answers.com/main/download_answers_win.jsp

Regards


Fernando


Direct link Reply with quote
 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Adding Google Dictionary to Word

Advanced search







memoQ translator pro
Kilgray's memoQ is the world's fastest developing integrated localization & translation environment rendering you more productive and efficient.

With our advanced file filters, unlimited language and advanced file support, memoQ translator pro has been designed for translators and reviewers who work on their own, with other translators or in team-based translation projects.

More info »
CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use SDL Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search