Salesforce

WorldServer - after exporting a project with target language Serbian (Latin) to a WSXZ package, the SDLXLIFF file cannot be opened - the error is "The detected target language does not match that expected by the project."

« Go Back

Information

 
Article TypeSolution Article
Scope/EnvironmentWorldServer
Symptoms/Context
We have created a project with target language Serbian (Latin) and/or Serbian (Cyrillic) and we have exported it to a WSXZ package. After opening the WSXZ package in Trados Studio, when opening the SDXLIFF file, an error appears and the file cannot be opened. The error is: 

The detected target language does not match that expected by the project.

User-added image

Note: if the project has Serbian as a source language, the error will obviously point to it and not to the target language:

The detected source language does not match that expected by the project.

User-added image
Resolution

The error appears when the source or the target language is

Serbian (Latin)
or
Serbian (Cyrillic)

The reason for the error is that these 2 languages have a language ISO code (sr-SP) that is no longer supported by Studio or Microsoft and therefore, for many years, they have been mapped to specific language codes in exchange.properties. The mapping is as follows:

studioLocaleMapping25=Serbian (Cyrillic), sr-Cyrl-CS
studioLocaleMapping26=Serbian (Latin), sr-Latn-CS


However, Microsoft has recently changed these language codes to - respectively - 'sr-Latn_RS' and 'sr-Cyrl-RS', as documented here. These new language codes are now recognized by Trados Studio while the previous ones are no longer recognized. If the previous language codes are used, the error will appear in Trados Studio when opening the SDLXLIFF file.

Resolution 1 (recommended): replace the previous language codes with the new ones in the exchange.properties file. Follow these steps:

1- On the server where WorldServer is installed, find the exchange.properties file and make sure it is placed under WS_CONFIG folder. If you have a copy of exchange.properties also under WS_CONFIG/ws-legacy, WS_CONFIG/ws or WS_CONFIG/ws-api, make sure you apply the change there as well.

2- In the exchange.properties file, you should find the mappings as:

studioLocaleMapping25=Serbian (Cyrillic), sr-Cyrl-CS
studioLocaleMapping26=Serbian (Latin), sr-Latn-CS

3- Change the mapping to

studioLocaleMapping25=Serbian (Cyrillic), sr-Cyrl-RS
studioLocaleMapping26=Serbian (Latin), sr-Latn-RS

4- Save the change in exchange.properties
5- Restart WorldServer (name: WorldServer Service or IdiomRun) and FTS (WorldServer FTS Services)
6- Export the project to a new WSXZ package. This package will work correctly.

Another resolution: instead of using Serbian (Latin) or Serbian (Cyrillic) as languages in your WorldServer environment, use Serbian (Latin) (Serbia) or Serbian (Cyrillic) (Serbia). These languages already have the correct language code.

User-added image
Workaround to fix the WSXZ package

If you cannot apply the resolutions mentioned above right away but you need to be able to open the WSXZ package and translate, here is the workaround:


1- Unzip the WSXZ package using 7-Zip. A folder with the same name will be created.
2- In the folder, find the bilingual *.sdlxliff file and open it in Notepad ++.
3- In the SDLXLIFF file, find the incorrect language code e.g. target-language="sr-SP"
4- Replace it with the correct language code e.g. if your target language is Serbian (Latin), replace target-language="sr-Latn-CS" with "sr-Latn-RS". If your target language is Serbian (Cyrillic, replace target-language="sr-Cyrl-CSwith "sr-Cyrl-RS".
5- Save the change in Notepad++.
6- Select all the files and folders inside the main folder and zip them.
7- Rename the ZIP file to *.WSXZ format. 
8- Open the WSXZ package created in step in Trados Studio, and open the bilingual file.
9- It will open up correctly and without error.
10- Translate and after translation, create a WorldServer Return package as usual.
11- Upload the Return package to WorldServer. The upload will work without issues.

Root Cause
Reference
Attachment 1 
Attachment 2 
Attachment 3 
Attachment 4 
Attachment 5 

Powered by