RE: [xliff] Quick question on trgLang

From
Estreen, Fredrik <>
Date
2014-10-28T11:30:14+00:00
ID
Thread
RE: [xliff] Quick question on trgLang
Hi Ryan, Yves,

 

I also read it as trgLang is optional if there are no targets and required if there is a target.

 

This also makes the most sense from a usage perspective. You can prepare a source file once without setting it and then translate copies into different languages.
 Or you can set a specific language before handing a file to someone for processing to ensure you get it processed for the correct language. If there is any target content it must have an associated language,

 

Regards,

Fredrik Estreen

 

From:  [mailto:]
On Behalf Of Yves Savourel

Sent: den 27 oktober 2014 22:35

To: 'Ryan King'; 

Subject: RE: [xliff] Quick question on trgLang

 

Hi Ryan,

 

My reading is the same as your first one: that trgLang is
optional except when there is one or more <target> in the document.

 

Cheers,

-ys

 

From:
 [mailto:]
On Behalf Of Ryan King

Sent: Monday, October 27, 2014 3:29 PM

To: 

Subject: [xliff] Quick question on trgLang

 

Hi all,

 

As we’ve started implementing the standard, there are, of course, differing interpretations of some of the wording in the spec. Can the TC as a group please help me understand
 the following:

 

4.2.2.1 xliff

…

Constraints

·      
The

trgLang attribute is REQUIRED if and only if the
XLIFF Document contains

<target> elements that are children of

<segment> or

<ignorable>.

Does this constraint mean:

·      
The

trgLang attribute is REQUIRED
if the XLIFF Document contains

<target> elements that are children of

<segment> or

<ignorable>,
otherwise it is optional. 

Or does it mean:

·      
The

trgLang attribute is REQUIRED
only if the XLIFF Document contains

<target> elements that are children of

<segment> or

<ignorable>,
otherwise it MUST not be present. 

For example, is this legal?

<xliff version=”2.0” srcLang=”en-us” trgLang=”de-de”>

…

   <unit id=”1”>

      <segment id=”1”>Hello World</segment>

   </unit>

I think it is, but want to be sure I am reading this correctly. In a more general question, is there a reason why the verbiage “if and only if” is used throughout
 the spec and not just “if”?

Thanks,

Ryan