Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
mNo edit summary
m (→‎See also: The "Info" section as it was isn't really necessary.)
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
  +
{{wowapi}}
<center>'''GetLanguageByIndex''' - ''Documentation by VelvetPaw''</center>
 
   
 
Returns the language specified by the index that your character can speak.
 
Returns the language specified by the index that your character can speak.
Line 19: Line 19:
 
=== Example ===
 
=== Example ===
   
for x=1, GetNumLaguages() do
+
for x=1, GetNumLanguages() do
 
DEFAULT_CHAT_FRAME:AddMessage(GetLanguageByIndex(x))
 
DEFAULT_CHAT_FRAME:AddMessage(GetLanguageByIndex(x))
 
end
 
end
   
== Info ==
+
== See also ==
 
* [[API GetNumLanguages|GetNumLanguages()]] - Returns the number of languages your character can speak.
=== for .. do ===
 
 
:Look for the 'for .. do' block at the [http://www.lua.org/manual/5.0/ Reference Manual].
 
 
=== GetNumLaguages() ===
 
 
:[[API GetNumLaguages|GetNumLaguages()]] - Returns the number of languages your character can speak (I guess Blizzard's programmers mistyped that function name).
 
 
=== DEFAULT_CHAT_FRAME:AddMessage("text",r,g,b) ===
 
 
:;[[API ScrollingMessageFrame AddMessage|ScrollingMessageFrame:AddMessage("text",r,g,b,id)]] : Valid Frame names:<br>DEFAULT_CHAT_FRAME<br>ChatFrame1 - ChatFrame7
 
----
 
__NOTOC__
 
{{Template:WoW API}}
 
[[Category:API Functions|GetLanguageByIndex]]
 
[[Category:API Chat Functions|GetLanguageByIndex]]
 

Revision as of 07:21, 27 January 2010

Returns the language specified by the index that your character can speak.

Language = GetLanguageByIndex(index)

Parameters

Arguments

index
index
Numeric - The index starting at 1.

Returns

Language
Language
String - Returns the language specified by the index that your character can speak.

Example

for x=1, GetNumLanguages() do
  DEFAULT_CHAT_FRAME:AddMessage(GetLanguageByIndex(x))
end

See also