Saturday, January 07, 2012

One language at a time

Some words (or expressions) are spelled the same in many languages. For example "India" is translated as "India" in tens of languages.

OmegaWiki used to load all these languages and display them in one page. This resulted in a few minutes of lag while the server was loading all the necessary data (also slowing down requests from other users), and in a huge page with many redundant and unnecessary data. This was even worse if a user decides to edit such a page.

From now on, an expression page displays only one language at a time, and a combobox appears to switch to other languages when the cursor hovers over the language name (see picture).


It also works while editing or viewing the history of a page. As expected, the server does not lag anymore for such a page. Gerard told me that Nauru has even more languages. Now you can click it without fear :-)

A nice side-effect is the possibility to link to a word in a specific language.
For example:
- http://www.omegawiki.org/index.php?title=Expression:main&explang=85 for the English word "main"
- http://www.omegawiki.org/index.php?title=Expression:main&explang=86 for the French word "main".


Coming next will be the possibility to filter which languages are shown in the translation tables and definitions, according to what the user wants to see.