Thread Tools Display Modes
09-13-19, 06:36 PM   #1
Aeriez
A Fallenroot Satyr
Join Date: May 2007
Posts: 24
Localization Help

So I've got the jist on *how* to localize an addon. My question, and request for assistance, is regarding *what* needs to be localized. Is it just any text that I'm presenting within the addon? It's primarily for data collection and doesn't manipulate much within the game aside from collecting raid boss names and player names. If there's a good detailed guide anyone is aware of that would be great.
  Reply With Quote
09-13-19, 11:52 PM   #2
Lybrial
A Flamescale Wyrmkin
AddOn Compiler - Click to view compilations
Join Date: Jan 2010
Posts: 120
There are already some global localized strings from blizzard you can use:

https://github.com/tekkub/wow-global.../GlobalStrings

You dont need to add these files to your project. The variables are existing in the WOW API.

If you want to support more languages you need to implement the translations yourself.
You do not need to translate Player Names. In general I think you dont need to translate
anything at all since most of the players do speak english I would allege. But if you want
to provide quality you should at least translate descriptions, guides, introductions, etc.
  Reply With Quote
09-14-19, 07:48 AM   #3
bsmorgan
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 219
Some of the addon repositories and package managers provide localization support. I have found that (if you allow it) anonymous (to me) people will actually do the translations for you.
  Reply With Quote
09-14-19, 01:44 PM   #4
Aeriez
A Fallenroot Satyr
Join Date: May 2007
Posts: 24
I've found individuals interested in helping with translations. I'm simply not certain what within the addon needs to be translated. It's clearly not working in other localizations.
  Reply With Quote
09-14-19, 02:21 PM   #5
Lybrial
A Flamescale Wyrmkin
AddOn Compiler - Click to view compilations
Join Date: Jan 2010
Posts: 120
Originally Posted by Aeriez View Post
It's clearly not working in other localizations.
What you mean with that?
  Reply With Quote
09-14-19, 04:33 PM   #6
bsmorgan
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 219
Originally Posted by Aeriez View Post
I'm simply not certain what within the addon needs to be translated.
Any "english" text you use should be localized. This includes text that is output, text labels on buttons and other controls, and any text used for comparision to things that might be translated already. Tooltips is an excellent example of text that will be localized by Blizzard.

Search the addons you have installed for ones with a Locale sub-folder that contains multiple files with names like Locale-enUS.lua, Locale-deDE.lua, etc. You will one of them (usually -enUS) will contain an array (usually L) where each key is set to true. In the other files, the keys will be identical, but the values will be the translation. You can then look at the code for places where, for example, L["word"] or L["this is a phrase"] are used. These will be translated using the various Locale-xxYY.lua files.
  Reply With Quote
09-15-19, 03:52 AM   #7
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
How to localize an addon: https://phanx.net/addons/tutorials/localize

What to localize: any text the user will read.
  Reply With Quote
09-15-19, 12:11 PM   #8
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
If your addon does not work when not localized, this means that your code is looking for text strings that are in your locale only.

For example,
Lua Code:
  1. GetItemInfo("Linen Cloth")
will only work in your locale. It's called "Leinenstoff" in German, "Paņo de lino" in Spanish, etc. In these instances, you need to use the itemID instead.
Lua Code:
  1. GetItemInfo(2589)
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Localization Help

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off