Visual Studio plugin (vsix) localization

zhihao huang 20 Reputation points
2023-08-24T03:41:34.4466667+00:00

I create a .vsct file by creating a new xml file (https://learn.microsoft.com/zh-cn/visualstudio/extensibility/internals/how-to-create-a-dot-vsct-file?view=vs-2022) , and then added to the project reference. Finally, after I modified the visual studio environment language, the menu command of the plug-in did not take effect. I don't know where I went wrong. Who can help me.

Developer technologies | Visual Studio | Extensions
{count} votes

2 answers

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2023-08-24T13:03:21.5166667+00:00

    Hi @zhihao huang

    Welcome to Microsoft Q&A! 

    You need to create a separate .vsct file for each supported language. 

    For more information, you can refer to: Localize command names

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. zhihao huang 20 Reputation points
    2023-09-06T05:46:21.31+00:00

    I have solved this problem, but I still want to tell you (to confirm whether it is a VS problem).

    I solved this problem. The reason for me here is that I did not add resources related to cto in the project. And vs will automatically generate an empty resource file (.resx) during the compilation process, and prompt that the automatically generated resource file does not exist (actually exists), warning message: "VSSDK1009: could not find any matching cto files to merge for resource 'obj\Debug_EmptyResource.resources", which caused the menu resources to fail to be merged into the cto file (I also found that the menu resources were not output by decompiling the resource DLL file), which is what we saw, disappeared in VS.

    So my solution: Create two empty resource files (zh-hans, en-US), and configure them as MergeWithCTO in the project file

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.