ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Custom Localizations (https://www.esoui.com/forums/showthread.php?t=5290)

ZOS_ChipHilseberg 11/19/15 09:41 AM

Custom Localizations
 
Over the past few weeks we have implemented a secure system to supply custom localizations for ESO. Here are the steps for setting up a custom localization:
  1. Choose a prefix for your language. Any two letter string is valid, but we would recommend sticking to the official language codes.
  2. In the addons folder make an “EsoUI” folder, and then a “lang” folder inside of that.
  3. Inside the “lang” folder make <prefix>_pregame.str and <prefix>_client.str files. These files will contain UTF-8 encoded text.
  4. Fill out the .str files with lines of the form: [<stringId>] = “text”. For example: [SI_ACCOUNT_NAME] = “Translated Account Name”.
  5. In the addons folder make a “gamedata” folder, and then a “lang” folder inside of that.
  6. Inside the “lang” folder place a translated <prefix>.lang file.
  7. Set the game language to your new prefix and the game will load your localization files.
The goal is to get this into the next patch right now. Please leave any questions or feedback here.

ZOS_ChipHilseberg 11/19/15 09:42 AM

The changes from the last post are it no longer only supports a specific set of custom languages, and it now supports pregame.

sirinsidiator 11/19/15 10:11 AM

This sounds great and I have two questions.
Does this affect the variable expansion of $(language) in the addon metafile in any way?
And will GetCVar("language.2") return the custom language code as it has in the past?

ZOS_ChipHilseberg 11/19/15 10:21 AM

Yes to both. We are loading $(language)_pregame.str and $(language)_client.str.

TERAB1T 11/19/15 02:48 PM

In Russian localization we use custom fonts (because ESO doesn't support cyrillic charset). How can we replace default fonts with our custom fonts in pregame, loadscreens, Crown Store and other places that don't support public API?

ZOS_ChipHilseberg 11/19/15 04:57 PM

Hmm, that's a stickier problem. I'll have to give some thought to it.

ZOS_ChipHilseberg 11/19/15 05:05 PM

We could potentially do something like:

[Font:ZoFontGame] = "xyz.otf|32"

Where this would make a font object with the name and descriptor. Would that be sufficient?

TERAB1T 11/20/15 06:00 AM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 24329)
We could potentially do something like:

[Font:ZoFontGame] = "xyz.otf|32"

Where this would make a font object with the name and descriptor. Would that be sufficient?

Thanks for your response. This will work perfectly for files:
  • \esoui\libraries\globals\defaultfontdefs.xml
  • \esoui\libraries\globals\keyboard\defaultfontdefs_keyboard.xml
  • \esoui\libraries\globals\gamepad\defaultfontdefs_gamepad.xml

But we also have some font definitions in other places:
  • \esoui\app\loadingscreen\gamepad\gamepadloadingscreen.xml
  • \esoui\app\loadingscreen\sharedloadingscreen.xml (font="EsoUi/Common/Fonts/Univers67.otf|20|soft-shadow-thick" in "$(grandparent)ZoneDescription" and so on)
  • \esoui\internalingame\market\gamepad\marketclasses_gamepad.xml
  • \esoui\internalingame\market\keyboard\marketclasses_keyboard.xml
  • \esoui\internalingame\marketannouncement\keyboard\marketannouncement_keyboard.xml
  • \esoui\overlay\gamepad\overlayfontdefs_gamepad.xml
  • \esoui\overlay\keyboard\overlayfontdefs_keyboard.xml
  • \esoui\pregame\charactercreate\keyboard\zo_charactercreate_keyboard.xml
  • Chat Bubbles
  • and function ZO_TooltipStyledObject:GetFontString(...) for gamepad UI

These places potentially may have problems with fonts replacement, so please check them too.

ZOS_ChipHilseberg 11/20/15 01:46 PM

Alright. The font directive is implemented as specified and we've moved those outlying font objects into the default def files.

TERAB1T 11/20/15 01:57 PM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 24331)
Alright. The font directive is implemented as specified and we've moved those outlying font objects into the default def files.

Thank you. You rock :)

CradonWar 11/25/15 12:06 PM

Turkish team leader here! First of all, thank you so much Chip. And I have a question for you. Can we have our own chat channels? I think /<prefix>zone or /$(language)zone should work. Generic channels would be good.

TERAB1T 11/30/15 09:35 AM

I've remembered two things about unsupported languages:

1. Technical support. You can't access to support, if your language is not en/de/fr. Can you make something like (pseudo code):

if (unsupported_language) support = en;

2. Cinematic intro. If you launch game for the first time with unsupported language, you will see only black screen after login instead of character selection. Because game cannot find file \Video\Opening_Cinematic_[custom_language].bik. Can you add check for file existence, and if it doesn't exist, load English version of intro?

TERAB1T 11/30/15 10:02 AM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 24329)
[Font:ZoFontGame] = "xyz.otf|32"

And the most important question. Where do we need to put these fonts definitions?

TERAB1T 11/30/15 11:14 AM

Patch have been downloaded, but language selection still locked to en/fr/de. What do we need to do to enable our languages?

ZOS_ChipHilseberg 11/30/15 12:52 PM

Quote:

Originally Posted by TERAB1T (Post 24467)
I've remembered two things about unsupported languages:

1. Technical support. You can't access to support, if your language is not en/de/fr. Can you make something like (pseudo code):

if (unsupported_language) support = en;

2. Cinematic intro. If you launch game for the first time with unsupported language, you will see only black screen after login instead of character selection. Because game cannot find file \Video\Opening_Cinematic_[custom_language].bik. Can you add check for file existence, and if it doesn't exist, load English version of intro?

1) The things that use the ingame browser right now will no longer do that in the coming future.

2) We added $(officialLanguage) and made use of that to load the right video.

ZOS_ChipHilseberg 11/30/15 12:53 PM

Quote:

Originally Posted by TERAB1T (Post 24471)
Patch have been downloaded, but language selection still locked to en/fr/de. What do we need to do to enable our languages?

Looks like there was a small patch in between the one we were targetting. It isn't in this patch. We'll try to get a more concrete estimate.

ZOS_ChipHilseberg 11/30/15 12:54 PM

Quote:

Originally Posted by TERAB1T (Post 24468)
And the most important question. Where do we need to put these fonts definitions?

It's the same as other font definitions. You specify the path.

ZOS_ChipHilseberg 11/30/15 05:00 PM

Quote:

Originally Posted by CradonWar (Post 24384)
Turkish team leader here! First of all, thank you so much Chip. And I have a question for you. Can we have our own chat channels? I think /<prefix>zone or /$(language)zone should work. Generic channels would be good.

This one is not likely. Sorry.

CradonWar 12/02/15 04:24 AM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 24475)
Looks like there was a small patch in between the one we were targetting. It isn't in this patch. We'll try to get a more concrete estimate.

Is there any date? We're waiting for almost a month.

ZOS_ChipHilseberg 12/02/15 11:58 AM

Quote:

Originally Posted by CradonWar (Post 24494)
Is there any date? We're waiting for almost a month.

The work necessary to make this a real feature was wide reaching so we're being very careful to make sure it is as bug free as possible. We'll let you know as soon as it is officially assigned to a patch.

TERAB1T 12/02/15 12:26 PM

Chip, can you tell us, why in ESO is available only latin (and extended latin, but not whole) charset? Why cyrillic, greek and other charsets are programmatically blocked? I saw you added support for letters ñ (for Spanish players) and å (for Scandinavian players). Is there any chance that you can add support for cyrillic letters?

DarioZ 12/10/15 07:55 AM

Many thanks!

TERAB1T 12/11/15 01:54 PM

Hey Chip! Any news for us?

ZOS_ChipHilseberg 12/14/15 12:04 PM

The known bugs have been fixed and are being verified. As for Cyrillic, the game font does not have glyphs for Cyrillic characters so we can't just add them to the base set. We'd have to do something special that would let them be used in localization but then not used in things like chat or guild/character names because those need to show up properly on clients that aren't using default fonts.

Vikki 12/14/15 01:25 PM

Chip, could you give us a rough idea of terms?

Scraelos 12/15/15 03:54 AM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 24766)
The known bugs have been fixed and are being verified. As for Cyrillic, the game font does not have glyphs for Cyrillic characters so we can't just add them to the base set. We'd have to do something special that would let them be used in localization but then not used in things like chat or guild/character names because those need to show up properly on clients that aren't using default fonts.

Hello, Chip!
First of all, many thanks for your work with community.:banana:
Is it so hard to obtain cyrillic and other glyphs?
If so, you could just add our characters to base set, but programmatically forbid to use them in user input, such as chat, guild and character names. I think, it will not affect user expierence of those who use default fonts.

TERAB1T 12/18/15 12:58 PM

Chip, is there any chance that you will release update before the New Year?

QuadroTony 12/20/15 03:17 AM

looks like no patch 21 December either:(

TERAB1T 01/05/16 09:06 AM

Chip, please give us any info about release date.

CradonWar 01/05/16 11:51 AM

It's been two months but still there is not even an information. If you're not going to release that patch, please just let us know.

haggen 01/05/16 12:06 PM

Although I agree a ping every now and then is great he's not a lone wolf, Chip works for a company, a big one, he has procedures to follow and a boss to report to, etc, so take it easy guys.

Great relations with the community is good but not top priority of any company. :P

sirinsidiator 01/07/16 07:15 AM

This might not be entirely on topic, but I was wondering if it would be possible to add a method GetEngineString (or some other name) that can return any string that is located in the non-lua localization file.
That way it would be possible to use NPC name and location translations among other things in addons.

Ckau 01/08/16 01:06 PM

Hey Chip! Any news for us?

Ayantir 01/08/16 02:04 PM

Spamming here won't help. Just wait ? ZOS already respond that translation *will* come back. You just need to wait and meanwhile, improve translations..

If I was you, I'll focus for a resolution of your problem not before Thief Guild instead of asking myself every two days .. "will it be at next week ?"

Chip is not only a dev, he's a boss, have a boss, got deadlines and got ultra critical things to do (already late!) before critical things to do (do it today !!), before urgent things to do (this weeks!) before low level features (after or while lunchtime / week-end / at home@VPN).

ZOS_ChipHilseberg 01/19/16 08:55 AM

I can officially say that the custom localization changes will be included on the PTS realm for the upcoming patch in early February. We had hopes to get the changes onto live earlier, but it ended up being an 80+ file hand coded merge with the live code base that we didn't feel confident to launch in an incremental patch environment.

Scraelos 01/19/16 09:04 AM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 25538)
I can officially say that the custom localization changes will be included on the PTS realm for the upcoming patch in early February. We had hopes to get the changes onto live earlier, but it ended up being an 80+ file hand coded merge with the live code base that we didn't feel confident to launch in an incremental patch environment.

Thank you! I will get drunk this week or something like that :banana:

TERAB1T 01/19/16 10:13 AM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 25538)
I can officially say that the custom localization changes will be included on the PTS realm for the upcoming patch in early February. We had hopes to get the changes onto live earlier, but it ended up being an 80+ file hand coded merge with the live code base that we didn't feel confident to launch in an incremental patch environment.

Great news! Thanks for this update, Chip!

JohnnyKing94 01/22/16 11:55 AM

FINALLY... YEAHHHHHHHHhh...

TERAB1T 02/03/16 02:53 PM

2.3.0 patch notes have been published, but I can't find any mention of custom localizations in it. Why?

JohnnyKing94 02/03/16 03:22 PM

Quote:

Originally Posted by TERAB1T (Post 25843)
2.3.0 patch notes have been published, but I can't find any mention of custom localizations in it. Why?

I think we need to wait for API changelog to know more about it...

ZOS_ChipHilseberg 02/03/16 04:08 PM

Trying to get them posted. I think community is busy with the game notes right now.

TERAB1T 02/04/16 05:55 AM

Hi Chip!

System works, but still have some bugs.

1. Font bugs on the character selection screen.

File \esoui\pregame\characterselect\keyboard\zo_characterselect_keyboard.xml

You forgot to change font definitions: http://i.imgur.com/QnDCfif.jpg

2. Crown Store doesn't work at all - both text and fonts: 1, 2, 3

3. Gamepad UI - a lot of font bugs: 1, 2, 3
As far as I remember these bugs were related to the function ZO_TooltipStyledObject:GetFontString(...), but I am not sure.

4. Chat Bubbles still doesn't work.

If I find something else, I will write it here.

ZOS_ChipHilseberg 02/04/16 09:53 AM

Quote:

Originally Posted by TERAB1T (Post 25857)
Hi Chip!

System works, but still have some bugs.

1. Font bugs on the character selection screen.

File \esoui\pregame\characterselect\keyboard\zo_characterselect_keyboard.xml

You forgot to change font definitions: http://i.imgur.com/QnDCfif.jpg

2. Crown Store doesn't work at all - both text and fonts: 1, 2, 3

3. Gamepad UI - a lot of font bugs: 1, 2, 3
As far as I remember these bugs were related to the function ZO_TooltipStyledObject:GetFontString(...), but I am not sure.

4. Chat Bubbles still doesn't work.

If I find something else, I will write it here.


1. I have a fix in for this.

2. Nothing is allowed to touch crown store strings in any language right now for security reasons. This is unlikely to change.

3. These can be fixed by swapping out the fontFace properties in ZO_TOOLTIP_STYLES with your fonts. I'd probably just iterate the style tables and check for the fontFace property and if it exists swap it out with your font.

4. This one might be possible to add, but it isn't something chat bubbles can do right now.

TERAB1T 02/04/16 10:43 AM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 25864)
1. I have a fix in for this.

2. Nothing is allowed to touch crown store strings in any language right now for security reasons. This is unlikely to change.

3. These can be fixed by swapping out the fontFace properties in ZO_TOOLTIP_STYLES with your fonts. I'd probably just iterate the style tables and check for the fontFace property and if it exists swap it out with your font.

4. This one might be possible to add, but it isn't something chat bubbles can do right now.

1. Great.

2. Understandable. But how to remove these "[ENG]" prefixes then? Maybe you allow us atleast partial translation? For example names and descriptions only. As you can see above, we still can change Crown Store strings, but don't have proper fonts.

3. Thanks.

ZOS_ChipHilseberg 02/04/16 10:52 AM

I can swap it so it loads $(officialLanguage)_client.lua so the unhandled strings will be english instead of the [eng] strings.

Cervanteso 02/04/16 02:31 PM

Spanish translation is working fine except for Crown Store. TERAB1T's already described the problem. Thanks a lot for supporting us, Chip.

DarioZ 02/05/16 08:17 AM

ESO Italia working too :D

TERAB1T 02/18/16 03:12 AM

Hey Chip!

All three bugs above are fixed, thanks for this. But I've found two other problems:

1. North direction on compass (SI_COMPASS_NORTH_ABBREVIATION) always uses original English string ("N"), not our modified string. In Russian "North" is "Север", so we need to use letter "С", not "N". We can fix this bug by ourselves, but a native fix is always better.
2. And again Crown Store. "[ENG]" prefixes are not a problem anymore, but we have some problems with fonts. When you hover on item, you can see this item's card with description. This description is not related to Crown Store, but still uses native fonts, not modified: http://i.imgur.com/VCGU7C5.jpg

Can you allow us to use custom fonts in Crown Store? Custom fonts can't cause any security issues, right? Because we still can't change any interface strings there.

TERAB1T 02/29/16 05:04 PM

Hey Chip! Any luck we'll have a fix for the problem above?

ZOS_ChipHilseberg 03/01/16 05:40 PM

Quote:

Originally Posted by TERAB1T (Post 26055)
Hey Chip!

All three bugs above are fixed, thanks for this. But I've found two other problems:

1. North direction on compass (SI_COMPASS_NORTH_ABBREVIATION) always uses original English string ("N"), not our modified string. In Russian "North" is "Север", so we need to use letter "С", not "N". We can fix this bug by ourselves, but a native fix is always better.
2. And again Crown Store. "[ENG]" prefixes are not a problem anymore, but we have some problems with fonts. When you hover on item, you can see this item's card with description. This description is not related to Crown Store, but still uses native fonts, not modified: http://i.imgur.com/VCGU7C5.jpg

Can you allow us to use custom fonts in Crown Store? Custom fonts can't cause any security issues, right? Because we still can't change any interface strings there.

Both of these are possible but will require a non-trivial amount of work. They will not be in the next update.

TERAB1T 03/22/16 03:25 PM

Hey Chip!

Any news about Crown Store fix? It's very annoying bug, and for now this is the only bug, that we can't fix by ourselves.

TERAB1T 04/10/16 04:49 PM

Okay, you said it's hard to fix. But how about this? We can move all fonts to separate .str file (say "*_fonts.str") and load this file in Crown Store UI without loading custom interface strings.

Our goal: we need to make custom fonts support, BUT we also want to disallow editing of interface strings in Crown Store.

We have three files:

1. \esoui\pregamelocalization\pregamelocalization.txt

Lua Code:
  1. ## DependsOn: ZO_FontDefs
  2. EsoUI\PregameLocalization\LocalizePregameGeneratedStrings.lua
  3. $(languageDirectory)\lang\$(officialLanguage)_pregame.lua
  4. $(languageDirectory)\lang\$(language)_pregame.str

2. \esoui\ingamelocalization\ingamelocalization.txt

Lua Code:
  1. ## DependsOn: ZO_FontDefs
  2. EsoUI\IngameLocalization\LocalizeGeneratedStrings.lua
  3. $(languageDirectory)\lang\$(officialLanguage)_client.lua
  4. $(languageDirectory)\lang\$(language)_client.str

3. \esoui\internalingamelocalization\internalingamelocalization.txt

Lua Code:
  1. ## DependsOn: ZO_FontDefs
  2. EsoUI\InternalIngameLocalization\LocalizeInternalIngameGeneratedStrings.lua
  3. ; For now, all of the InternalIngame strings will be compiled into the client.lua files
  4. ; if memory becomes an issue, since we are duplicating ingame strings into another GUI,
  5. ; we will need game tools to create new output internalingame.lua files
  6. $(languageDirectory)\lang\$(officialLanguage)_client.lua

So what do we need to do? Move all fonts from $(language)_pregame.str and $(language)_client.str to the new file: $(language)_fonts.str. From now "pregame.str" and "client.str" will contain only strings, and "fonts.str" - only fonts. So those three files above can be changed like this:

1. \esoui\pregamelocalization\pregamelocalization.txt

Lua Code:
  1. ## DependsOn: ZO_FontDefs
  2. EsoUI\PregameLocalization\LocalizePregameGeneratedStrings.lua
  3. $(languageDirectory)\lang\$(officialLanguage)_pregame.lua
  4. $(languageDirectory)\lang\$(language)_pregame.str
  5. $(languageDirectory)\lang\$(language)_fonts.str

2. \esoui\ingamelocalization\ingamelocalization.txt

Lua Code:
  1. ## DependsOn: ZO_FontDefs
  2. EsoUI\IngameLocalization\LocalizeGeneratedStrings.lua
  3. $(languageDirectory)\lang\$(officialLanguage)_client.lua
  4. $(languageDirectory)\lang\$(language)_client.str
  5. $(languageDirectory)\lang\$(language)_fonts.str

3. \esoui\internalingamelocalization\internalingamelocalization.txt

Lua Code:
  1. ## DependsOn: ZO_FontDefs
  2. EsoUI\InternalIngameLocalization\LocalizeInternalIngameGeneratedStrings.lua
  3. ; For now, all of the InternalIngame strings will be compiled into the client.lua files
  4. ; if memory becomes an issue, since we are duplicating ingame strings into another GUI,
  5. ; we will need game tools to create new output internalingame.lua files
  6. $(languageDirectory)\lang\$(officialLanguage)_client.lua
  7. $(languageDirectory)\lang\$(language)_fonts.str

I don't know is it possible (since I don't know how the system works on deeper levels), but I hope this will help. What do you think?

TERAB1T 04/28/16 04:28 AM

Chip, tell us something please. If you are not going to fix this, just say so. So we can stop waiting. Ignoring is the worst.

Scraelos 05/09/16 04:06 AM

We have started a discussion on ESO forums https://forums.elderscrollsonline.co...roken-in-2-4-0

Scraelos 06/16/16 07:46 AM

We have ZOS answer on our issue, but no real actions yet(
https://forums.elderscrollsonline.co...omment_3004397

ZOS_ChipHilseberg 06/16/16 08:01 AM

With some of the new tech for the Japanese client that just went in with Dark Brotherhood we can dynamically add letters to the font at run time. With this we could allow alphabets like Cyrillic to be used even though the game fonts don't have any glyphs for those characters. In the game font they would appear as boxes, but with a font file that has those glyphs it would work. This would mean there would be no need to remap Cyrillic onto other supported characters, which would allow the crown store to show up in English correctly. What do you think of that idea?

TERAB1T 06/16/16 08:44 AM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 27460)
With some of the new tech for the Japanese client that just went in with Dark Brotherhood we can dynamically add letters to the font at run time. With this we could allow alphabets like Cyrillic to be used even though the game fonts don't have any glyphs for those characters. In the game font they would appear as boxes, but with a font file that has those glyphs it would work. This would mean there would be no need to remap Cyrillic onto other supported characters, which would allow the crown store to show up in English correctly. What do you think of that idea?

Well, this idea is great (for other reasons), but this will not solve our problem with Crown Store. We have two main problems now:

1. Crown Store

Sometimes Crown Store loads Russian strings (especially in tooltips), but Crown Store uses default fonts (without cyrillic characters), so we see broken names, descriptions etc. Take a look:





So our problem is not in the characters remapping, our problem is in inability to load custom fonts. If we'll use normal cyrillic characters, our Crown Store still will be broken, but instead of incorrect latin characters we'll see boxes, because we can't remap the whole font (e.g. "EsoUI/Common/Fonts/Univers67.otf" -> "RuESO/Fonts/Univers67.otf").

2. Chat Bubbles and Nameplates

These features don't have an ability to change their fonts. Can we have something similar to SetSCTKeyboardFont(...) and SetSCTGamepadFont(...), but for Chat Bubbles and Nameplates please?

And one more thing - I noticed your recent changes with charset system. And I tried to use native cyrillic characters, but saw only boxes (even with proper fonts with cyrillic support). How to use it properly?

ZOS_ChipHilseberg 06/16/16 09:41 AM

Okay, I think I see the issue. Then I propose 3 changes:
  • Allow Cyrillic as a character range that can dynamically render glyphs at run time.
  • Load a .str file for internal ingame, but restrict it to font setup only.
  • Add APIs to set fonts for nameplates and chat bubbles.

Would that be sufficient to fix all of the issues?

TERAB1T 06/16/16 09:44 AM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 27463)
Would that be sufficient to fix all of the issues?

Yes, that will be enough to fix all of our issues. Thank you!

ZOS_ChipHilseberg 06/22/16 11:42 AM

The first two changes should be on the first PTS build.


All times are GMT -6. The time now is 03:07 PM.

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