Thread Tools Display Modes
01/27/23, 05:41 PM   #1
quentinlamamy
 
quentinlamamy's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2016
Posts: 24
Question l10n - English style name from style id

Hi,

I would like to get the english name of a style from id (for example 9 for khajiit), is there a built in method for that or do i need to code that ?
  Reply With Quote
01/27/23, 06:00 PM   #2
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 639
No all the strings like this are in a compressed file with over 800,000 to 900,000 lines of text. Which of course is not anything you would ever change. There is no ID or indicator to get the string. There is barely a way for unofficial translations to have ID numbers of a sort for their workflow. That's simply not available.

You have GetString(SI_SOMETHING_IN_CAPS) and that's it.

Last edited by Sharlikran : 01/27/23 at 06:04 PM.
  Reply With Quote
01/27/23, 06:07 PM   #3
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 639
https://www.esoui.com/forums/showthread.php?t=10326

That thread has a text file in it named "ESOUIDocumentationP36_2.txt" and that is all we have available to us.

Then you have this

https://wiki.esoui.com/Constant_Values

Which could be missing constants and values because it's only as up to date as those who contribute to it make it.

Last edited by Sharlikran : 01/27/23 at 06:09 PM.
  Reply With Quote
01/27/23, 06:31 PM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,960
Originally Posted by quentinlamamy View Post
Hi,

I would like to get the english name of a style from id (for example 9 for khajiit), is there a built in method for that or do i need to code that ?
Best way to find out if there is a way is search in ESO UI source code of the game at places where you know it is shown.
Search for zo_strformat or ZO_CachedStrFormat as they use the same SI_* constants (and call GetString internally) and will often add the number at the end as suffix to make the SI_*<suffixNumber> constant complete.

e.g. something like SI_STYPEPAGE_1, SI_STYPEPAGE_2, SI_STYPEPAGE_9 -> Khajit etc. (only examples, I don't know if these exist).
Some of those SI* constants can be found here:
https://raw.githubusercontent.com/es...tedstrings.lua

But most, like itemnames, style stuff etc. either are only readable via API functions (e.g. GetItemName(bagId, slotIndex) -> check the API documentaiton txt file that Sharlikran provided for soemthing like GetStyleName or similar.
I found this:
GetItemStyleName(styleId)



btw:
GetString(SI_*) and API functions will return the text in the client language, not always English! Could be en, de, fr, ru, es, jp and zh for the official ones, or even pt, pl, ... and what ever else meanwhile exists -> These custom languages define the translations in the big files that Sharlikran mentioned themselves and release them as custom mods, changing game files.

Last edited by Baertram : 01/27/23 at 06:40 PM.
  Reply With Quote
01/27/23, 06:40 PM   #5
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
Originally Posted by quentinlamamy View Post
Hi,

I would like to get the english name of a style from id (for example 9 for khajiit), is there a built in method for that or do i need to code that ?
No. You can only get localization for the currently loaded language because the game won't load other languages due to their sheer size (as Sharlikran mentioned). If you need English names at all times, you need to hardcode these into your addon.
  Reply With Quote
01/28/23, 02:50 AM   #6
quentinlamamy
 
quentinlamamy's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2016
Posts: 24
Thumbs up

Thanks all for your answer,

I will hardcode thos name, no choice key have to have the same name whatever the player lang.

Dear moderator : Thread resolved, can be mark as solved
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » l10n - English style name from style id

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