In an effort to achieve consistent behaviour across a range of platforms and applications, some changes have been made to control the way in which language metadata is used in our software. These changes may affect your plugin or application integration with the public APIs, especially if Sdl.Core.Globalization.Language referenced in the project.
The following are a list of changes and known issues to consider when updating your plugin to be compatible with Trados Studio 2022 SR1
Plugin Manifest
The manifest file pluginpackage.manifest.xml is located at the root of your project solution. The values of the RequiredProduct should be updated to align with the latest release.
RequiredProduct
- Min version should be set to: 17.1. If your plugin has been updated to support this latest release of Trados Studio, then you should reflect this by setting the minimum supported version to 17.1
- Max version should be set to 17.9. It is recommended to also set this value, as it will provide the AppStore with sufficient information in correctly identifying plugins that are compatible with the version of Trados Studio that is launched.
- Name should be set to: TradosStudio
Example<?xml version="1.0" encoding="utf-8"?>
<PluginPackage xmlns="http://www.sdl.com/Plugins/PluginPackage/1.0">
<PlugInName>My plugin name</PlugInName>
<Version>1.1.0.0</Version>
<Description>My plugin description</Description>
<Author>Trados AppStore Team</Author>
<RequiredProduct name="TradosStudio" minversion="17.1" maxversion="17.9" />
</PluginPackage>
Project References
The following changes should be applied in the project file (.csproj)
-
Add a reference to Sdl.Core.Globalization.Async, if your code is making reference to Sdl.Core.Globalization.Language
<Reference Include="Sdl.Core.Globalization.Async"> <HintPath>$(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.Core.Globalization.Async.dll</HintPath> </Reference>
-
It is recommended that you use the reserved and well-known MSBuild property $(MSBuildProgramFiles32) as opposed to $(ProgramFiles) to define the location of the 32-bit program folder C:\Program Files (x86)\, for example:
<Reference Include="Sdl.Desktop.IntegrationApi.Extensions"> <HintPath>$(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.Desktop.IntegrationApi.Extensions.dll</HintPath> </Reference>
Language Registry API
Third party developers now have access to Trados Studio's custom language registry, which offers finer control over language management than the language registry provided by Microsoft. Following this change, CultureCode is now the recommended alternative to the standard CultureInfo.
To ensure compatibility with Studio and other RWS system interfacing with Studio please recover the language info using our internal language registry
private CultureCode GetCultureCode(string cultureIsoCode) { try { // Language registry contains all the languages that are supported in Studio var language = LanguageRegistryApi.Instance.GetLanguage(cultureIsoCode); return new CultureCode(language.CultureInfo); } catch (UnsupportedLanguageException) { // In case the language is not supported an exception is thrown return null; } }
Use LanguageRegistryApi.Instance to recover all langauges
private IList<Language> GetAllLanguages() { return LanguageRegistryApi.Instance.GetAllLanguages() }
Known Issues
The following are a list of known issues and solutions that you might encounter depending on your settings and configuration