UnderMine has asked for the wisdom of the Perl Monks concerning the following question:
Is it possible to mark up alternative translations effectively in HTML/XML?
Further thoughts in the Extracting appropriate language text from HTML data thread highlighted the fact different sections of a document may have different translations available (Thanks john_oshea). The following example markup works fine if you only request English but either French or Italian messes up badly.
Extracting English returned :-<locale lang="en">English Part 1</locale> <locale lang="fr">French Part 1</locale> <locale lang="en">English Part 2</locale> <locale lang="it">Italian Part 2</locale>
However extracting French returned :-<locale lang="en">English Part 1</locale> <locale lang="en">English Part 2</locale>
And extracting Italian returned :-<locale lang="fr">French Part 1</locale>
<locale lang="it">Italian Part 2</locale>
Both of these are very wrong. Are there any standard ways of solving this problem?
A logical extention of my markup might be to wrap each section in a wrapper tag.
<locale> <locale lang="en">English Part 1</locale> <locale lang="fr">French Part 1</locale> </locale> <locale> <locale lang="en">English Part 2</locale> <locale lang="it">Italian Part 2</locale> </locale>
Alternatively giving each locale block an id would have a similar effect.
Both of these would work for graphic designers and people who are used to editing HTML but what would be the most intuative solution for a normal person.<locale lang="en" id="part1">English Part 1</locale> <locale lang="fr" id="part1">French Part 1</locale> <locale lang="en" id="part2">English Part 2</locale> <locale lang="it" id="part2">Italian Part 2</locale>
Thanks
UnderMine
Edited to mark Off Topic and fix links. UnderMine
2006-06-03 Retitled by g0n, as per Monastery guidelines
Original title: 'OT Marking up alternatives'
2006-06-03 Retitled by g0n, as per Monastery guidelines
Original title: 'Marking up alternatives'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (OT) Marking up alternatives
by dragonchild (Archbishop) on May 30, 2006 at 02:59 UTC | |
by UnderMine (Friar) on May 30, 2006 at 12:06 UTC | |
|
Re: (OT) Marking up alternatives
by rhesa (Vicar) on May 29, 2006 at 20:57 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |