Have you ever thought that it would be great to write one document including all the translations in a single file? Outside of the fact that this makes the document relatively large, it makes the translation really fast, the translator can see the sentence in all the other languages and translate from that. I actually wrote an HTML test file with two styles. One is named English and the other is named Français. And since a style entry can depend on the currently selected language, you can write style entries that get hidden when on or the other language is selected. So, if you select French, I can hide all the languages in the file except French. As you can see, all the tags including text are duplicated for both languages and each one of these tags includes the language name as one of its attribute. Then we define two styles. The title attribute is used to make sure that both style blocks are not used together. Then whenever a user loads that page, the see a selection under the Just by selecting the style, you see the whole page translated in one language or the other. Of course, a proper version would not have one style per language. You would expect to have users who use a certain language (i.e. ‘fr’) and hide all the others in your one style. In other words, you always would send all the languages, and the style decides which language needs to be displayed. Whether this is practical, maybe not, but I thought it was an interesting concept.
<html>
<head>
<title lang="en">Dual Language</title>
<title lang="fr">Deux Langages</title>
<style type="text/css" media="screen" title="English">
:lang(fr) { display: none; }
h1 { color: #004488; } /* used to distinguish both styles */
</style>
<style type="text/css" media="screen" title="Français">
:lang(en) { display: none; }
</style>
</head>
<body>
<h1 lang="en">Is that really possible?</h1>
<h1 lang="fr">Est-ce vraiment possible?</h1>
<p lang="en">There is a discovery that pleases me quite well!</p>
<p lang="fr">Voici une decouverte qui me fait bien plaisir!</p>
</body>
</html>
View > Use Style
menu (SeaMonkey) or View > Page Style
menu (FireFox).
Comments
Post new comment