<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.6.2">
</HEAD>
<BODY>
<BR>
<TT>Hi Martin,</TT><BR>
<BR>
<TT>There is no contradiction in the specs regarding source languages. The</TT><BR>
<TT>attribute "source-language" is required in <file> elements and it</TT><BR>
<TT>indicates the language for the <source> elements in the given <file></TT><BR>
<TT>element.</TT><BR>
<BR>
<TT>All <source> elements that are direct children of <trans-unit> in a</TT><BR>
<TT>given <file> have the same implied language. You can either include or</TT><BR>
<TT>omit an "xml:lang" attribute in these <source> elements, but if you</TT><BR>
<TT>include it, then its value must match the one declared at <file> level.</TT><BR>
<BR>
<TT>You can, however, use any language in <source> elements that belong to</TT><BR>
<TT>an <alt-trans> element. Nevertheless, it does not make sense to use</TT><BR>
<TT>unrelated source languages in <alt-trans> elements. Variations of a same</TT><BR>
<TT>root language are relevant, like en-US and en-GB, but mixing things like</TT><BR>
<TT>en-GB and de-DE is not useful at all.</TT><BR>
<BR>
<TT>Situation with target language is similar. The main difference is that</TT><BR>
<TT>the attribute "target-language" is not required in <file> element.</TT><BR>
<BR>
<TT>If you declare a "target-language" attribute at <file> level, then you</TT><BR>
<TT>don't need to declare an "xml:lang" attribute in the <target> of a</TT><BR>
<TT><trans-unit>. The language declared at <file> is considered to be</TT><BR>
<TT>inherited. The optional "xml:lang" should always match "target-language"</TT><BR>
<TT>as a child of <trans-unit> but can vary as a child of <alt-trans>.</TT><BR>
<BR>
<TT>In a similar way, you are free to use any language in <target> elements</TT><BR>
<TT>of an <alt-trans>. As said before, unrelated languages do not make much</TT><BR>
<TT>sense. Notice that you can have more than one <target> element in</TT><BR>
<TT><alt-trans>, so it is in theory possible to find related translations</TT><BR>
<TT>for the same source in different dialects.</TT><BR>
<BR>
<TT>Hope this helps,</TT><BR>
<TT>Rodolfo</TT><BR>
<BR>
<TT>On Mon, 2005-09-19 at 17:41 +0200, Martin Wunderlich wrote:</TT><BR>
<TT><FONT COLOR="#737373">> May I take the liberty to trouble you with another one of my</FONT></TT><BR>
<TT><FONT COLOR="#737373">> XLIFF-beginner questions? I was wondering about the exact relationship</FONT></TT><BR>
<TT><FONT COLOR="#737373">> between the attributes "source-language" in the <file> element and the</FONT></TT><BR>
<TT><FONT COLOR="#737373">> attribute in "xml:lang" in the elements <xliff>, <source> and</FONT></TT><BR>
<TT><FONT COLOR="#737373">> <target>. </FONT></TT><BR>
<TT><FONT COLOR="#737373">> </FONT></TT><BR>
<TT><FONT COLOR="#737373">> 1) When it says "The optional xml:lang attribute is used to specify</FONT></TT><BR>
<TT><FONT COLOR="#737373">> the language of the content of the document", does this mean it</FONT></TT><BR>
<TT><FONT COLOR="#737373">> specifies the same language as "source-language" for the <file></FONT></TT><BR>
<TT><FONT COLOR="#737373">> elements?</FONT></TT><BR>
<TT><FONT COLOR="#737373">> </FONT></TT><BR>
<TT><FONT COLOR="#737373">> 2) If I have the attributes "source-language" and "target-language"</FONT></TT><BR>
<TT><FONT COLOR="#737373">> set for a <file> element, would I still need to specify "xml:lang" for</FONT></TT><BR>
<TT><FONT COLOR="#737373">> the sources and targets of the file's TU's?</FONT></TT><BR>
<TT><FONT COLOR="#737373">> </FONT></TT><BR>
<TT><FONT COLOR="#737373">> If I understand the specs correctly, they don't enforce any mappings</FONT></TT><BR>
<TT><FONT COLOR="#737373">> between these attributes. So, you could in theory have contradicting</FONT></TT><BR>
<TT><FONT COLOR="#737373">> language settings, it seems. </FONT></TT><BR>
<TT><FONT COLOR="#737373">> </FONT></TT><BR>
<TT><FONT COLOR="#737373">> Cheers, </FONT></TT><BR>
<TT><FONT COLOR="#737373">> </FONT></TT><BR>
<TT><FONT COLOR="#737373">> Martin</FONT></TT><BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
Rodolfo M. Raya <<A HREF="mailto:rodolfo@heartsome.net">rodolfo@heartsome.net</A>><BR>
Heartsome Holdings Pte Ltd
</TD>
</TR>
</TABLE>
</BODY>
</HTML>