Quantcast Language changes - WoWInterface
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Unread 08-29-12, 09:19 PM   #1
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 8
Post Language changes

Discovered the following updating one of my addons last night:

SendChatMessage() no longer accepts capitalized language names as a way of specifying what language the character is using. By intercepting the function and using the chat menus to change languages, I discovered that it is now being passed a number specifying the language to use.

The language numbers can be obtained from GetLanguageByIndex(), which now has two return values, like so:

LanguageName, LanguageNumber = GetLanguageByIndex(index);

index 1 appears to still be the faction language, while index 2 is the character's native language, for those whose faction language is not their native language. GetNumLanguages() still returns the number of languages the character knows, which is the maximum index for GetLanguageByIndex; thus, you can walk the list of languages the character knows, getting their names and numbers.

If you attempt to pass SendChatMessage() a string with a language name in the old style, the character uses their faction language.
efindel is offline  

Go BackWoWInterface » Legion Beta » MoP Beta archived threads » Language changes

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off