Search code examples
c#visual-studioresx.net-standard-2.0multilingual-app-toolkit

Multilingual App Toolkit .xlf file is not updated during build


We have a .net standard application (Visual Studio 2017) with Multilingual App Toolkit installed. When adding a translation language to a given .resx-file (right click--> add translation language) it generates the .xlf-file as expected. However, after adding a key to the existing .resx-file and running the custom tool, the .xlf-file should be updated during a rebuild, but it doesn't.

The xlf-file includes this:

   `<file datatype="xml" source-language="en" target-language="de" original="../PROPERTIES/RESOURCES.RESX" tool-id="MultilingualAppToolkit" product-name="n/a" product-version="n/a" build-num="n/a">`

so it references the correct .resx-file.

Do we have to set a build option to update the .xlf-files or is there any way to update the .xlf file manually to get the new keys from the .resx-file?


Solution

  • By default, the build action for the *.xlf-files is set to "None" (Right click on .xlf- file --> properties --> Configuration Properties). Setting it to "XLIFF Localization file" solves the problem and everything works as expected.