doubter
doubter

Reputation: 61

Microsoft Office Plugin Language

I'm developing a Word plugin and I'd like to set the language layout depending on the Word language.

I have two CustomUI xml which will be returned depending on the Word language.

For that I'm checking the language with:

System.Globalization.CultureInfo.CurrentCulture.DisplayName.Substring(0, 2).ToUpper()

The problem is that it always returns (PO)...it's Portuguese...even when I change, in the Word options, everything to English. On the other hand, If I use CurrentUICulture returns EN (English) always.

I'd like to know how to resolve the issue.

Thanks in advance

Upvotes: 0

Views: 235

Answers (1)

Hans Passant
Hans Passant

Reputation: 941525

The active language pack that the user selected is independent of the system default language. You'll need to use the Application.Language property.

Upvotes: 1

Related Questions