View Single Post
03/01/20, 05:57 AM   #3
Hyperioxes
 
Hyperioxes's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2020
Posts: 6
Originally Posted by sirinsidiator View Post
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"
You're right it will work much better, thanks a lot for help!
  Reply With Quote