Outlook Version language

故事扮演 提交于 2021-01-29 04:25:25

问题


I am developing an outlook 2007 add in.
How can i know the outlook language(English or French version..)


回答1:


There are a number of ways you can go about doing this. Although the exact process depends on the Exchange server version, a MAPI client (Outlook in this case) will set the PR_LOCALE_ID property in the user's information store to the ID of the locale (LCID) in which the MAPI client (Outlook) is running during logon.

That may or may not work for you.

I do not know exactly how the value used for the LCID is determined by Outlook, so this may not be useful in environments that have a complicated Office language configuration.

Also, the way in how the PR_LOCALE_ID property is set varies greatly depending on your Exchange version. I believe that in Exchange 2007+ it will only set the LCID during profile creation and initial logon, and won't touch it again, even if the user's locale changes. Creating a new profile is the only way for it to update.

I have not written anything that provides the functionality described above, so your mileage may vary with that technique.

You do have another option available to you if you have access to the registry, however. If you have Outlook 2007 installed, you should have a registry key named "InstalledUI" located at (assuming 32-bit machine):

HKLM\SOFTWARE\Microsoft\Office\12.0\Common\LanguageResources\InstalledUI

If you look in that key, you should see values that have an LCID for the name. You can conclude that any LCID appearing here is supported by the system. The values for each LCID (REG_SZ) indicate the status of the language. So, for example, I'll have a value named "1033" set to "On" if English is active for me.

Hopefully, one of these techniques will prove useful for you.



来源:https://stackoverflow.com/questions/2310259/outlook-version-language

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!