WoW:API GetText: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 2: Line 2:




  strResult = GetText(sIdentifier, nNumber);
  strResult = GetText(sIdentifier, nNumber, ordinal);


GetText is used to localize some game text like PvP-ranks or spell text.
GetText is used to localize some game text like PvP-ranks or spell text.
Line 11: Line 11:
:;sIdentifier:String - Identifier for the text to localize i.e.: PVP_RANK_5_1
:;sIdentifier:String - Identifier for the text to localize i.e.: PVP_RANK_5_1
:;nNumber:Number - Number that is used in the text (for format-strings), can be nil. GetText does not seem to use this.
:;nNumber:Number - Number that is used in the text (for format-strings), can be nil. GetText does not seem to use this.
:;ordinal:Unknown


=== Returns ===
=== Returns ===

Revision as of 06:33, 7 January 2008

WoW API < GetText

"I" iconThis function is implemented in Lua here FrameXML/LocaleProperties.lua.


strResult = GetText(sIdentifier, nNumber, ordinal);

GetText is used to localize some game text like PvP-ranks or spell text.


Parameters

Arguments

sIdentifier
String - Identifier for the text to localize i.e.: PVP_RANK_5_1
nNumber
Number - Number that is used in the text (for format-strings), can be nil. GetText does not seem to use this.
ordinal
Unknown

Returns

strResult
String - The localized text corresponding to sIdentifier.


Notes

This is used for all the PvP-ranks titles that are displayed above characters (and some other stuff). So if you i.e. replace this with a function, that always returns "stupid", all players with PvP-ranks will run around with a name tag like "stupid xyz". This is used rarely and I am not sure what kind of ID-keys you can used.