[xliff-tools] Sun Editor with OASIS files

Rodolfo M. Raya rodolfo at heartsome.net
Mon Sep 19 09:23:20 PDT 2005


Hi Martin,

There is no contradiction in the specs regarding source languages. The
attribute "source-language" is required in <file> elements and it
indicates the language for the <source> elements in the given <file>
element.

All <source> elements that are direct children of <trans-unit> in a
given <file> have the same implied language. You can either include or
omit an "xml:lang" attribute in these <source> elements, but if you
include it, then its value must match the one declared at <file> level.

You can, however, use any language in <source> elements that belong to
an <alt-trans> element. Nevertheless, it does not make sense to use
unrelated source languages in <alt-trans> elements. Variations of a same
root language are relevant, like en-US and en-GB, but mixing things like
en-GB and de-DE is not useful at all.

Situation with target language is similar. The main difference is that
the attribute "target-language" is not required in <file> element.

If you declare a "target-language" attribute at <file> level, then you
don't need to declare an "xml:lang" attribute in the <target> of a
<trans-unit>. The language declared at <file> is considered to be
inherited. The optional "xml:lang" should always match "target-language"
as a child of <trans-unit> but can vary as a child of <alt-trans>.

In a similar way, you are free to use any language in <target> elements
of an <alt-trans>. As said before, unrelated languages do not make much
sense. Notice that you can have more than one <target> element in
<alt-trans>, so it is in theory possible to find related translations
for the same source in different dialects.

Hope this helps,
Rodolfo

On Mon, 2005-09-19 at 17:41 +0200, Martin Wunderlich wrote:
> May I take the liberty to trouble you with another one of my
> XLIFF-beginner questions? I was wondering about the exact relationship
> between the attributes "source-language" in the <file> element and the
> attribute in "xml:lang" in the elements <xliff>, <source> and
> <target>. 
>  
> 1) When it says "The optional xml:lang attribute is used to specify
> the language of the content of the document", does this mean it
> specifies the same language as "source-language" for the <file>
> elements?
>  
> 2) If I have the attributes "source-language" and "target-language"
> set for a <file> element, would I still need to specify "xml:lang" for
> the sources and targets of the file's TU's?
>  
> If I understand the specs correctly, they don't enforce any mappings
> between these attributes. So, you could in theory have contradicting
> language settings, it seems. 
>  
> Cheers, 
>  
> Martin
-- 
Rodolfo M. Raya <rodolfo at heartsome.net>
Heartsome Holdings Pte Ltd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/xliff-tools/attachments/20050919/311e8721/attachment.html


More information about the xliff-tools mailing list