XML files containing translations



[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>

The problem is this can mean so many things:

	* This can mean two separate <description> tags, with the first
	  one included in every locale and the second one only in
	  Hungarian ones
	* These are two <description> tags, and both are only available in
	  one locale ("C" and "hu"), so because of the C fallback, any
	  locale other than "hu" should include only the first one, and
	  "hu" should include both
	* This is one tag, included in "C" and "hu" locale, so if
	  locale="hu", only the second one exits, in other cases, only the
	  first one exists.

And maybe other cases as well. I definitely need some clarification here.
I realize that there are many more issues in selecting the appropriate tag
because there can be multiple locales set, but this part is very
straightforward compared to deciding which set of tags to choose from.

Thanks in advance,
	Gergo


-- 
   .--= ULLA! =---------------------.   `We are not here to give users what
   \     http://cactus.rulez.org     \   they want'  -- RMS, at GUADEC 2001
    `---= cactus@cactus.rulez.org =---'
Sok kicsi sokat kicsinál.




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