[xliff-tools] Sun Editor with OASIS files

Martin Wunderlich martin_wu at gmx.net
Mon Sep 19 12:17:04 PDT 2005


Hi Rodolfo, 

Thanks a million for the details and for clarifying. I presume I might have missed the section in the specs where it talks about inheritance of attributes. 
It still leaves the question of how to deal with any conflicts, e.g. if the source-language of the file is set to one value and the xml:lang att in the source elements that are children of the file is set to a different value. Which one would take precedence? Also, any ideas on what the xml:lang att in the xliff element would specify exactly?
Sorry, if I'm making this more complicated than it is. I'm playing around with a little Java app for processing XLIFF files and these questions came up today. 

Cheers, 

Martin

  -----Original Message-----
  From: xliff-tools-bounces at lists.freedesktop.org [mailto:xliff-tools-bounces at lists.freedesktop.org]On Behalf Of Rodolfo M. Raya
  Sent: Monday, September 19, 2005 6:23 PM
  To: XLIFF-Tools
  Subject: Re: [xliff-tools] Sun Editor with OASIS files



  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/03b19d03/attachment.html


More information about the xliff-tools mailing list