Adding Google Dictionary to Word
Thread poster: Shouguang Cao

Shouguang Cao
China
Local time: 09:06
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]


 

Hepburn  Identity Verified
France
Local time: 03:06
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


 

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

Nice tool Man!

 

xxxFabio Said  Identity Verified
Germany
Local time: 03:06
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

icon_smile.gif


 

Shouguang Cao
China
Local time: 09:06
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]


 

Luca Tutino  Identity Verified
Italy
Local time: 03:06
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


 

Shouguang Cao
China
Local time: 09:06
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.


 

Patricia Rosas  Identity Verified
United States
Local time: 18:06
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


 

Fernando Toledo  Identity Verified
Germany
Local time: 03:06
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


 


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







SDL MultiTerm 2017
Guarantee a unified, consistent and high-quality translation with terminology software by the industry leaders.

SDL MultiTerm 2017 allows translators to create one central location to store and manage multilingual terminology, and with SDL MultiTerm Extract 2017 you can automatically create term lists from your existing documentation to save time.

More info »
Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »



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