WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Localization Help (https://www.wowinterface.com/forums/showthread.php?t=57483)

Aeriez 09-13-19 06:36 PM

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.

Lybrial 09-13-19 11:52 PM

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.

bsmorgan 09-14-19 07:48 AM

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.

Aeriez 09-14-19 01:44 PM

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.

Lybrial 09-14-19 02:21 PM

Quote:

Originally Posted by Aeriez (Post 333737)
It's clearly not working in other localizations.

What you mean with that?

bsmorgan 09-14-19 04:33 PM

Quote:

Originally Posted by Aeriez (Post 333737)
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.

myrroddin 09-15-19 03:52 AM

How to localize an addon: https://phanx.net/addons/tutorials/localize

What to localize: any text the user will read.

Seerah 09-15-19 12:11 PM

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)


All times are GMT -6. The time now is 08:33 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI