Tuesday, January 25, 2011 11:48:53 AM
Other languages available:
Swaplang is a simple extension built as part of the Multilingual Web Project that Opera is participating in.
It gives you a clear visual indicator if a page has translations linked (using proper HTML to make the linkage machine-readable), and if you click on the button it shows which translations are available in a menu you can use to go directly to another translation.
There is an odd bug at the moment - you may need to reload a page before the button gets activated for the first time. I can reproduce this, but can't figure out what causes it
See it in action
There are a number of internationalised pages available. To see the extension in action you can try W3C's internationalisation articles
How to make sure your translations are recognised
The extension recognises pages which make use of the relevant HTML attributes
hreflang on linking elements. You can do this in the head, like so:
<link rel="alternate" hreflang="fr" href="some.fr.htm" title="Version française" />
In which case the title will be copied into the menu, or within the body of the text, like
<a hreflang="de" rel="alternate" href="some.de.htm">(Diese Seite auf Deutsch)</a>
In which case the text content of the
a element will be copied into the translations menu.
Right now, it doesn't handle images being used, nor does it take the title of the
a element even if there is one. It does avoid repeated references (by comparing the
href attribute values), choosing the first relevant link by preference, which would normally be the
- Update the screenshots
- Not critical - the changes are cosmetic and minor.
- Make it do something useful with images, and generally handle menu text better
- This is important to me, but complicated
- Provide preferences so users can say what they want in a menu for a given language
- Add a translation button (by preference?)
- Use the tooltips and badge to give more info.
- This involves a minor re-write of the code that resizes the popup, as well as new functionality.
Version 1.4 compared to Version 1.3
Improve the handling of popup resizingDone.
- It would be nice if I could do this from within popup.html, like I can within a widget or normal window. But it doesn't seem to work currently. So I still bounce information around the extension to make it work.
Version 1.3 compared to Version 1.2
- Clean the code
- Easier to read, simplify some things, and make it more efficient
- Avoid interruptions from pages loading in the background
- Until now, if a tab loaded in the background with a different status to the focused tab it could change the status ofPublish documentation in Spanish
- Esta página. Now I only have to add …
Version 1.2 compared to version 1.0.1
Publish the sourceDone
Get the localised versions publishedDone
- But I can always use more...