Re: XML files containing translations



On Mon, Dec 24, 2001 at 12:22:42AM +0100, ERDI Gergo wrote:
> [please CC replies to cactus@cactus.rulez.org]
> 
> Hi,
> 
> In my project I'd like to use the xml-i18n-tools package to store all the
> translations in one file. However, it's not clear what algorithm I should
> use to retrieve the correct translation.
> 
> The problem is that it's not at all clear what set of tags I should look
> at. Consider the following, very simple file:
> 
> <target-def>
> 	<description>This is the description in English</description>
> 	<description xml:lang="hu">This is the description in Hungarian</description>
> </target-def>

  NOTE !!!!! An XML entity (i.e. a single file/resource part of an XML document)
has the ABSOLUTE requirement to be in a SINGLE ENCODING.
  What you describe scales only if you accept to have everything in the
same encoding and the english part is likely to force this to the small
set (UTF-8, ISO-Latin-... and a few others). And UTF-8 is the only one
which will allow to cover the full Unicode range.
  So when you write "This is the description in Hungarian" this is actually
"This is the description in Hungarian in UTF-8", or you expose yourself
to tons of problems in a relatively short term.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]