View Single Post
03/01/20, 05:40 AM   #2
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
Can't help you with the translations, but if it is ingame item names you want, why not store the item id and generate the label on addon load? That way you don't have to retranslate everything when they add new reagents, add a new language or change some label and it will automatically work with custom localization projects too.
All you need to do is build an item link from the id and then use GetItemLinkItemName and zo_strformat:
Lua Code:
  1. local itemId = 30148
  2. local link = ("|H0:item:%d:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|h|h"):format(itemId)
  3. local name = zo_strformat("<<t:1>>", GetItemLinkName(link))
  4. d(name) -- "Blue Entoloma"
  Reply With Quote