WoW:Localizing an addon: Difference between revisions

Previous text was slightly inaccurate
(Previous text was slightly inaccurate)
Line 92: Line 92:
== Accents, Special Chars and Umlauts ==
== Accents, Special Chars and Umlauts ==


This is somewhat delicate, the lua scripting language in wow deals with accents directly as unicode which means 2 things:
This is somewhat delicate as wow deals with accents directly as unicode which means 2 things:


First, it will not recognize an accent in a localized text if it's not in unicode and thus will not be able to match it to the accent that can be seen in the game interface.
First, it will not recognize an accent in a localized lua textfile if it's not in unicode and thus will not be able to match it to the accent that can be seen in the game interface.


In the previous example, if you try to match "endommagé" with the same string provided by the game, it will fail.  
In the previous example, if you try to match "endommagé" with the same string provided by the game, it will fail.  
Line 100: Line 100:
Second, since these are unicode char, they're actually coded on several distinct characters (usually 2), which has to be taken into account for string manipulations based on length.
Second, since these are unicode char, they're actually coded on several distinct characters (usually 2), which has to be taken into account for string manipulations based on length.


The use of and UTF-8 compatible editor is a must if you're dealing with accented characters, otherwise they probably be converted to the local charset equivalent which will not match the ingame data.
The use of and UTF-8 compatible editor is a must if you're dealing with accented characters, otherwise they'll probably be converted to the local charset equivalent which will not match the ingame data.


For a list of codes corresponding to various accentuated characters see
For a list of codes corresponding to various accentuated characters see
http://www.allegro-c.de/unicode/zcodes.htm (page is in german but the table allows to find what's needed quite easily).
http://www.allegro-c.de/unicode/zcodes.htm (page is in german but the table allows to find what's needed quite easily).
Automatic converter: http://black-fraternity.de/lua/utf8converter.php (Source: http://black-fraternity.de/lua/utf8converter.phps)


For our earlier chest example, a string that will match the ingame data would look like:
For our earlier chest example, a string that will match the ingame data would look like:
Anonymous user