WoW:API GetText: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
{{framexmlfunc|FrameXML/LocaleProperties.lua}} __NOTOC__ | |||
GetText is used to localize some game text like PvP-ranks or spell text. | |||
strResult = GetText(sIdentifier, nNumber); | |||
sIdentifier | GetText is used to localize some game text like PvP-ranks or spell text. | ||
nNumber | |||
== 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. | |||
=== Returns === | |||
:;:strResult:String - The localized text corresponding to sIdentifier.<br> | |||
== 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. | 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. | ||
Revision as of 14:20, 5 September 2006
This function is implemented in Lua here FrameXML/LocaleProperties.lua.
strResult = GetText(sIdentifier, nNumber);
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.
Returns
- strResult
- String - The localized text corresponding to sIdentifier.
- 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.