In the interest of full disclosure, my Spaces compatriot Jeffrey brought it to my attention that there is indeed a viable, Spaces-compatible Windows Live Translator gadget available in the flagging WL Gallery. You’re more than welcome to use it instead, as it now redirects to Bing Translator and does practcally the same thing as my solution. And I thought I was being all clever.
Based on an on-going discussion in one of my Windows Live Groups, I decided to write a quick tutorial to show just how easy it is to create a simple translator for your Windows Live Space, powered by Bing Translator.
As with anything related to Spaces, there are a bazillion different ways to accomplish this task, so for the purposes of our tutorial, I elected to go with a custom list, because it’s easy to manage, requires minimal coding, and can easily be placed almost anywhere on your space’s main page.
- Click Lists > Add a list. Choose a custom list, enter a title, and add a description.
- Click Save. The new list is created. Now it’s time to add your language options. Just add each language on a separate line. Since the visitors who’ll use this tool will be non-English readers, it’s a good idea to reference each language in it’s native name. If you’re unsure how to reference the name of the language or use special characters, use a service like Bing Translator, and simply paste the results into your list.
- Click Next. Your custom list is displayed. Of course, the links don’t actually do anything yet.
- Now it’s time to wire up each alternate language in your list. In a separate browser tab or window, navigate to http://www.microsofttranslator.com. Set the “To” language to Spanish and enter your space’s URL.
- Click Translate. Your page is translated, and the results are displayed. We’re really more interested in the URL than in the results. Select the URL in the address bar of the browser and copy it to the clipboard.
Here’s the URL I got from Bing Translator:
- Modify the URL as shown below. You can do this in Notepad, any text editor, or directly in your custom list (although, the editing space is a bit cramped):
Notice the new argument, &lp=en_es, which has been inserted into the query string. Here’s the breakdown:
- The ampersand (&) is used to indicate the start of a new argument.
- The value lp stands for language pair.
- The value en_es stands for English (en) to Spanish (Español, or es). The language code is typically the first two letters of the language’s native name (i.e., French is fr, German is de).
- Make sure the argument precedes the URL of your space, otherwise it won’t work properly.
- Back to our custom list. Click Edit to modify the Español list item.
- Paste the modified Bing Translator URL from step 6 into the Web address field. To help the translator list module fit into a tight space on the space’s main page, we’ll avoid adding a description.
- Click Save. You now have a functional Spanish translator for your space!
- Repeat the process for other languages. Make sure to modify the lp argument for each target language accordingly.
- When you’re finished, return to your space’s main page. The custom list module is added to the page automatically.
- To better fit the translator into your page, you may elect to move the module to a narrow column and possibly suppress the title.
That’s it! Now your international visitors will have a much easier time navigating in your space and reading your blog posts.
Like I said, there are several ways to present your translator links. For extra credit, you can also try using a custom HTML module instead of a list. The principle is the same, but a custom HTML module allows you to spice up the interface a little bit by adding image links (such as these little royalty-free flag icons I got courtesy of FamFamFam). Perhaps I’ll write a follow-up soon about how to accomplish that trick.
That’s all for now. Happy translating!