WoW:Localizing an addon: Difference between revisions

m
mNo edit summary
Line 170: Line 170:


A static table supplying, say scaling values for the minimap based on zone order, would have to be "localized" in the sense that the table need to be sorted differently according to the client's locale to give correct values.
A static table supplying, say scaling values for the minimap based on zone order, would have to be "localized" in the sense that the table need to be sorted differently according to the client's locale to give correct values.
== Spells in the spellbook ==
The same holds true for spells in the spellbook; they are in alphabetical order based on the locale.
The first 8 spells in a hunter's spellbook:
: This hunter has [[Enchanting]] and [[Herbalist]] profs.
<pre>-- Get spells 1-8
for n = 1, 8 do
    SpellsTable[n] = GetSpellName(n)
end</pre>
enUS client
<pre>SpellsTable = {
    "Attack", -- [1]
    "Basic Campfire", -- [2]
    "Beast Training", -- [3]
    "Cooking", -- [4]
    "Disenchant", -- [5]
    "Dodge", -- [6]
    "Dual Wield", -- [7]
    "Enchanting", -- [8]
}</pre>
esES client
<pre>SpellsTable = {
    "Adiestramiento de bestias", -- [1] (Beast Training)
    "Atacar", -- [2] (Attack)
    "Buscar hierbas", -- [3] (Find Herbs)
    "Cocina", -- [4] (Cooking)
    "Desencantar", -- [5] (Disenchant)
    "Doble empuñadura", -- [6] (Multi-Shot)
    "Encantamiento", -- [7] (Enchanting)
    "Espíritu de fuego fatuo", -- [8] (Basic Campfire)
}</pre>
In other words, GetSpellName(n) doesn't return the same value on all clients.


== Moderate yourself ==
== Moderate yourself ==
Anonymous user