如何从Word文件中找到检测到的语言? [英] How to find the detected language from Word File?
问题描述
在应用程序中,我可以看到word interop中有一个detectlanguage选项。
document.DetectLanguage();          
var res = document.LanguageDetected;
在调试时我可以看到观察窗口中的代码 LanguageDetected =
true
但我无法找到该语言名称。 我遍历每个单词并找到用于该单词的语言
document.Words [i] .LanguageID,每次我得到1033作为id。是否可以获得贬低的语言?
根据
Range.DetectLanguage Method(Word)
DetectLanguage方法的结果存储在字符的LanguageID属性中逐字符的基础。
此外,基于
WdLanguageID枚举,1033代表wdEnglishUS
你的意思是什么?"de detracted language" ?你想检查一个特定单词的语言是否改变了吗?
In application I can see there is an option for detectlanguage in word interop.
document.DetectLanguage(); var res = document.LanguageDetected;
while debugging the code from the watch window i can see LanguageDetected=
true
but I am unable to find that language name. I loop through the each word and find the language used for that word
document.Words[i].LanguageID for every time I got 1033 as id. Is it possible to get the detracted language or not?
Hi,
According to Range.DetectLanguage Method (Word)
The results of the DetectLanguage method are stored in the LanguageID property on a character-by-character basis.
Besides, based on WdLanguageID Enumeration, 1033 represent wdEnglishUS
What do you mean "detracted language" ? Do you want to check if the language of one specific word is changed?
这篇关于如何从Word文件中找到检测到的语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!