[MPEG-OTSPEC] Many to many substitution and localization
Liam R. E. Quin
liam at fromoldbooks.org
Fri Sep 27 02:18:34 CEST 2024
On Thu, 2024-09-26 at 18:04 +0100, William_J_G Overington via mpeg-
otspec wrote:
>
> For example, for localization into Welsh.
>
> sub !983 -> D i o l c h space a m space y m w e l d period ;
You can do this in XML with entities, and have language-appropriate
versions substituted automatically. This was by design.
Unfortunately, Web browsers do not support text entities in XML, even
XHTML, ostensibly for security reasons.
But it would be easy to write something in JavaScript that did this
sort of substitution, and that used HTTP content negotiation to get the
appropriate translation automatically, ideally with an override for
when that didn’t work, e.g. on a public kiosk.
This would be better than a font because (1) it would replace
characters, not glyphs (see Laurence’s reply about that), (2) it would
not interfere with linebreaking, and (3) it could also contain site-
specific translations, without needing expensive or specialist font
software to be used.
Best,
liam
--
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org
More information about the mpeg-otspec
mailing list