WoW:API GetDefaultLanguage: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
Line 35: Line 35:
----
----
{{Template:WoW API}}
{{Template:WoW API}}
[[Category:API Functions|GetDefaultLanguage]]
[[Category:API Chat Functions|GetDefaultLanguage]]
[[Category:API Communication Functions|GetDefaultLanguage]]

Revision as of 17:40, 29 August 2005

GetDefaultLanguage -Documentation by Jackson Colorado-

Returns the Language used by the indicated Player.

GetDefaultLanguage("player");

Arguments
String "player" : I haven't tested this thoroughly yet, but it seems that you can use the same constants that are used in the UnitName() function. Giving it "player" will return your own default language, for example.

Returns
String language : the default language of the indicated object.



Example
if( GetDefaultLanguage("player") ~= arg3) then ChatFrame:AddMessage(arg2 .. " is not speaking your language!"); end

(Remember, arg2 is the author and arg3 is the language in a standard "MSG" event.)

Result

If the player doesn't speak the same language as the person who spoke the message, you get:

(author) is not speaking your language!

Description

Returns the Language used by the indicated Player.


Template:WoW API