Creating a Custom Service for Office 2010 Mini Translator

clip_image002

The Martian presents

Creating a Custom Service for Office 2010 Mini Translator

Hello Earthlings,

 Today, I bring you information about how to extend the functionality of Office 2010 Mini Translator.   My helpful friends in the Office Global Experience Platform team already have many blogs about this cool new feature. You can find them by clicking on the Mini Translator tag.

The Mini Translator was created with the goal to allow users to translate words or phrases on the spot. It complements the Research pane for quick and easy access to translations, while having the option to drill down the results in the pane. This feature is built on top of Microsoft Office Research Services to allow developers to create their own research services that can be referenced and used by the Mini Translator.

The Microsoft® Office Research feature provides a rich and integrated search experience. It provides the ability to search multiple custom and third-party references and the convenience of accessing this information from within Office applications.

Office Research categorizes services based on the nature of the service. These categories are defined to help developers organize and describe their service. Within Office the user can then select the type of service they need, so that searches are done on these only. The Mini Translator is limited to Dictionaries and Translation Service Categories:

Level 1 category

Level 2 category

CategoryID

Equivalent enumeration value

 Reference Books

Dictionaries

36040000

REFERENCE_DICTIONARY

 

Translation

36120000

REFERENCE_TRANSLATION

Using these categories and following the Translation Dictionaries Content Development Kit, you can create your own bilingual translation dictionary. This kit allows you to create a dictionary that can be installed on the user’s machine and can be referenced by the Mini Translator. Local dictionaries have the advantage that they don’t require an Internet connection and can be easily deployed to individual machines. The kit provides an out-of-the-box solution that requires you only to create a list of terms for your dictionary and this can then be easily compiled for deployment. If your aim is to create a simple dictionary for a limited number of users, then this is your best option.

Alternatively you can create your own online research service to create an online dictionary. This option allows you to add as much functionality as needed beyond simple lookup. This also provides the advantage of creating a full online service that can be updated without having to deploy any new bits to your user’s machines. The process to create a full online service is well defined; but not trivial. If you’d like to know more, please refer to the full Microsoft Office Research Services SDK.

Office Research Services work on a query-response model. After the query is processed by the service, the response is returned in a predetermined XML format. This format is based on the Office Research Response Content Schema. You can determine what type of information your service needs to return using this schema. By following this schema, any feature that uses Research Services will be able to interpret and display the response. 

While you’re developing your custom dictionary or online dictionary, you need to know that the Mini Translator will not display everything that comes back in the response content schema. The Mini Translator strips out any <Image>, <Hyperlink> or <Tabular> tags. It will only display text inside <Heading>, <P>, <Line> or <NewQuery> for any <Text> or <Char> tag. This is done to simplify the formatting of the content so that it fits in the reduced space of the Mini Translator floating window. It also strips out <HorizontalRule>; but will automatically insert its own when it encounters multiple <Heading> tags. This is done to separate different definitions which appear under different result-sets in the research pane to increase readability in the Mini Translator. 

If you’re designing your service specifically for the Mini Translator, you need to remember these facts to ensure the best experience for your users. Drop a line below to let me know how it goes!

The Martian

As stars shine, so must I give special thanks to J. Barrera, Ziad Khalidi and Ahmad Abu-Dayah for their invaluable assistance with this article!.

 

The example companies, organizations, products, domain names, email addresses, logos, people and events depicted herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, or event is intended or should be inferred.

Comments

  • Anonymous
    January 01, 2003
    The comment has been removed
  • Anonymous
    July 29, 2011
    brother.............can i get a guide on how to create a bilingual dictionary for MS WORD the guide given here msdn.microsoft.com/.../aa159694(office.11).aspx has a problem where to find the buildobject.dll