language update comparison is exact in GenericSkeletonWriter

Issue #344 resolved
Former user created an issue

Original issue 344 created by and...@spartansoftwareinc.com on 2013-06-15T03:08:47.000Z:

GenericSkeletonWriter has logic to update the language property to the target language. For example, the XML Stream filter updates the xml:lang property. It only does this if the current value of the property is the source language. That check requires an exact locale string match.

There is a TODO in the code asking whether it should be region-insensitive. I think it should be. I can't think of any reason why, say, an xml:lang of "en-us" should not be updated if the document was filtered as "en" (or vice-versa). I think this is what most people would expet.

I changed the code to use LocaleId.sameLanguageAs.

Comments (3)

  1. Former user Account Deleted

    Comment 2. originally posted by @ysavourel on 2013-06-16T05:40:06.000Z:

    The change looks OK to me.

  2. Log in to comment