Studio project automation API Error Message "The source language of the file ('English (United States)') is different from the project source language."

Dear Forum,

Perhaps somebody can validate this issue or think of a workaround. We would be very grateful for any help.

We are using the project automation API in Studio 2022 SR2 CU11. We have encountered the error message described in this article: https://gateway.rws.com/csm?id=kb_article_view&sysparm_article=KB0039431

Error Message: The source language of the file ('English (United States)') is different from the project source language.

We are creating projects from German (Germany) to English (United States).

According to the article, the error occurs in Studio 2022 if you are using an XML1 file type and the solution is to upgrade to a XML2 file type. We are already using an XML2 file type and still encounter the error.

The behavior between the Studio 2022 client UI and the API differs: The error happens only when we use the Studio client API to automate project creation. The error does not happen when we create a project manually using the Studio Client UI, using the exact same source files and project template.

With Studio 2019, the error did not occur with the API or in the client UI.

The error occurs during the Scan task. Here is the API call:

I have attached the source file and project template.

Some background: Our source files contain the attribute xml:lang="en", regardless of the actual source language of the project. The obvious workaround would be to change the xml:lang attribute to the actual source language of the Studio project.  Unfortunately, it is not feasible for us to change the attribute because there are hundreds of thousands of source files in a legacy CMS, which we cannot change. We are currently migrating from Studio 2019, where our XML1 file type and the same source file did not cause this error message.

Many thanks in advance!

Kind regards,

Perry Stinson

sourceFile_projectTemplate.zip