ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   l10n - English style name from style id (https://www.esoui.com/forums/showthread.php?t=10432)

quentinlamamy 01/27/23 05:41 PM

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 ?

Sharlikran 01/27/23 06:00 PM

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.

Sharlikran 01/27/23 06:07 PM

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.

Baertram 01/27/23 06:31 PM

Quote:

Originally Posted by quentinlamamy (Post 47040)
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.

sirinsidiator 01/27/23 06:40 PM

Quote:

Originally Posted by quentinlamamy (Post 47040)
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.

quentinlamamy 01/28/23 02:50 AM

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


All times are GMT -6. The time now is 04:42 AM.

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