WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   AddOn for zone name translations? (https://www.wowinterface.com/forums/showthread.php?t=57407)

kernighan 08-31-19 03:59 PM

AddOn for zone name translations?
 
I have an AddOn I'm working on that has a database with fields like:

Code:

[L("Stormwind City")] = {
  IsCity = true,
  Continent = 2,
  MapFile = "Stormwind-City",
  MapScale = 0.03819701270887,
  MapOffset = { x = 0.41531450060561, y = 0.67097280492581 },

So you can see that "Stormwind City" is the key. Right now it's set to use local localization files to do the translation as what it used to use (libBabble-Zone) has died. Does anyone know of a similar addon that I could use for these translations rather than keeping them locally?

Thanks!

kernighan 08-31-19 04:01 PM

Note that this is for WoW Classic as well.

Nimhfree 08-31-19 06:12 PM

Instead of using the name of the zone as the key you can use Blizzard's mapId as the key. You can also ask the Blizzard API for the localized name of that mapId as well so you do not need to keep it in your structure. Look at the Blizzard API C_Map.GetMapInfo() for what its name and other goodies.

kernighan 08-31-19 06:17 PM

Quote:

Originally Posted by Nimhfree (Post 333488)
Instead of using the name of the zone as the key you can use Blizzard's mapId as the key. You can also ask the Blizzard API for the localized name of that mapId as well so you do not need to keep it in your structure. Look at the Blizzard API C_Map.GetMapInfo() for what its name and other goodies.

I was thinking of going this route, but a lot of instances have more than one MapID (at least for 8.x). I'd like to have two versions of my addon (one for 8.x, one for classic), but I'm stuck on 8.x because of this issue. I was hoping to find a Classic specific version of https://wow.gamepedia.com/InstanceID/Complete_list to see if it has the same problem. Some of the zones in Classic don't even exist in 8.x either, so that list isn't helpful to me.

kernighan 08-31-19 06:18 PM

Quote:

Originally Posted by kernighan (Post 333489)
I was thinking of going this route, but a lot of instances have more than one MapID (at least for 8.x). I'd like to have two versions of my addon (one for 8.x, one for classic), but I'm stuck on 8.x because of this issue. I was hoping to find a Classic specific version of https://wow.gamepedia.com/InstanceID/Complete_list to see if it has the same problem. Some of the zones in Classic don't even exist in 8.x either, so that list isn't helpful to me.

Sweet, I just found https://wow.gamepedia.com/UiMapID/Classic

kernighan 08-31-19 06:25 PM

Quote:

Originally Posted by kernighan (Post 333490)

So that gets me map IDs for everything I need except for these dungeons (at least for Classic):

Dire Maul
Gnomeregan
Wailing Caverns

kernighan 08-31-19 06:27 PM

Quote:

Originally Posted by kernighan (Post 333491)
So that gets me map IDs for everything I need except for these dungeons (at least for Classic):

Dire Maul
Gnomeregan
Wailing Caverns

And here we go, their instance IDs..

https://wow.gamepedia.com/InstanceID#Classic_Dungeons

kernighan 08-31-19 06:28 PM

Quote:

Originally Posted by kernighan (Post 333492)
And here we go, their instance IDs..

https://wow.gamepedia.com/InstanceID#Classic_Dungeons

Although that's for BfA.. not sure if they're the same for WoW Classic. :/

kernighan 08-31-19 06:47 PM

Quote:

Originally Posted by kernighan (Post 333493)
Although that's for BfA.. not sure if they're the same for WoW Classic. :/

Hm, missing Naxxramus for Classic as well.

Ketho 08-31-19 11:00 PM

Quote:

Originally Posted by kernighan (Post 333494)
Hm, missing Naxxramus for Classic as well.


Naxxramas should be the same Instance ID as in BFA (533)
https://wow.tools/dbc/?dbc=map&build...87#search=naxx

myrroddin 09-01-19 03:29 AM

Does Orgrimmar have different IDs for each floor? I only see one ID in the list.

kernighan 09-01-19 04:24 PM

Quote:

Originally Posted by myrroddin (Post 333499)
Does Orgrimmar have different IDs for each floor? I only see one ID in the list.


Two different issues -- Classic, I'm set, everything has a single ID.

However, for BfA, locations have multiple IDs. Since it's tracking vendor locations, I think I'll just have to use the local ID for where the vendor is located, which means a larger set of keys for the database but overall it'll work. :)


All times are GMT -6. The time now is 12:48 PM.

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