Detecting language please wait for.......
I created a file type plug-in for word file(doc, docx, docm).
When I run on Trados Studio 2017, "doc " type is OK, but "docx" and "docm" failed.
They are recognized as Word 2007-2019 file.
I found that the function BuildFileSniffer(string name) is not called.
My PC is windows10, and I used visual studio 2017 .
The file types I created have higher priority than Word 2007-2019 file type.
Can anyone suggest where problem may be?
How did you find
Li Shuang said:that the function BuildFileSniffer(string name) is not called
What does your INativeFileSniffer method Sniff look like? Does your `fileInfo.IsSupported` return true for .docx /.docm?
A little code might help.
Only BuildFileTypeInformation(string name) in the IFileTypeComponentBuilder is executed, other function is not executed.
So, sniff class is not executed at all.
I debugged on the visual studio 2017, and I found BuildFileSniffer(string name) is not called.
How do you debug a FileTypePlugin in VS?? I honestly don't know! I always output certain key values and "OK, am here" entries to a log file, because I have no idea how to "live debug" an FTPlugin.
Did you check the order of your file type in your project tempate or in the Studio options? Did you ensure that your file type is positioned above the Word 2007-2019 file? What happens if you uncheck theWord 2007-2019 file type?