Quantcast
The Multilingual Support Thread - ESOUI
Thread Tools Display Modes
04/20/14, 02:15 PM   #1
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 185
The Multilingual Support Thread

This thread is about the multilingual aspects of the game, the development and...especially, to hopefully get translations for terms you are looking for and have no clue how the proper translation would be in a different language. So feel free to ask any questions or request translations.

And...surprisingly, the coincidence is astonishing, I'm just looking for some translations

"gold coin"
"gold coins"
"Backpack is nearly full."
"Warning: Backpack is full now!"

If someone would be so kind and translate this to French...

Last edited by Iyanga : 04/20/14 at 02:24 PM.
  Reply With Quote
04/20/14, 05:00 PM   #2
ins
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 74
Think these are already translated in the UI.

SI_INVENTORY_ERROR_INVENTORY_FULL = "Your inventory is full".
SI_INVENTORY_ERROR_INSUFFICIENT_SPACE = "You need <<1>> open inventory <<1/slot/slots>>"


SI_CURRENCY_YOUR_GOLD = "Carried Gold"
SI_CURRENCY_YOUR_BANKED_GOLD = "Banked Gold"

Etc.

Suggest you grab ZGOO addon and look around with it in game.

Easier to use the already translated terms than having to create new ones (and then get them translated) I would think.
__________________
ins [Link: Author Portal Please use this for any suggestions/bug reports.]
  Reply With Quote
04/21/14, 10:07 AM   #3
Saucy
 
Saucy's Avatar
Join Date: Apr 2014
Posts: 20
ins, would it be possible for you (or someone else) to post a small example on how to use the string functions you posted?
  Reply With Quote
04/21/14, 10:44 AM   #4
ins
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 74
Well, in game you could just type
/script d(GetString(SI_CURRENCY_YOUR_GOLD)) and it should print the localized version of this string to your chat text.
So the output would be "Carried Gold" for "en" localization. The same "d(variable_name)" will work in an addon context.
These are global strings so they are available "all" the time.



Changing the CVar ("language.2") to "de" or "fr" would possibly let you see the other, unless EsoStrings (where these strings are from) needs to be reloaded to get other languages.

You can change the CVar in game

/script SetCVar("language.2","de")
/script GetCVar("language.2")

Etc.
__________________
ins [Link: Author Portal Please use this for any suggestions/bug reports.]

Last edited by ins : 04/21/14 at 11:29 AM.
  Reply With Quote
04/21/14, 11:09 AM   #5
Saucy
 
Saucy's Avatar
Join Date: Apr 2014
Posts: 20
Weird, when I try /script d(SI_CURRENCY_YOUR_GOLD), it prints the numbers 3278 in my chat, same thing if I print it from my addon.

I've ran /script d(GetCVar("language.2")) and it is set to "en".
  Reply With Quote
04/21/14, 11:10 AM   #6
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 185
Originally Posted by ins View Post
Think these are already translated in the UI.
I don't need to write "Carried Gold" or "Banked Gold". I need to write "gold coin".

Easier to use the already translated terms than having to create new ones (and then get them translated) I would think.
I don't think that I should turn reasonable output into a weird one, just so I can use terms that were translated already.

I got my terms translated by now, so all is good.
  Reply With Quote
04/21/14, 11:18 AM   #7
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 651
That's because SI_CURRENCY_YOUR_GOLD is just an ID for the string. You have to use GetString()
  Reply With Quote
04/21/14, 11:27 AM   #8
ins
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 74
That is what I get for typing while not being in game.

Example of use:

GetString(SI_NOT_ENOUGH_MONEY), which incidental should be the name of my next character. An Argonian.
__________________
ins [Link: Author Portal Please use this for any suggestions/bug reports.]

Last edited by ins : 04/21/14 at 11:30 AM.
  Reply With Quote
04/21/14, 12:34 PM   #9
Saucy
 
Saucy's Avatar
Join Date: Apr 2014
Posts: 20
Aha! Now it works, thanks guys.

If I had known about the GetString function, I would have a higher chance of figuring it out (instead of asking for more help). I appreciate the time both of you took to help a newb like me.
  Reply With Quote
04/23/14, 12:28 AM   #10
Mars85
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1
Is there something in the API to get original/english names? Especially because of the megaserver I'm really missing the CTRL feature of GW2 (having localized client and seeing english names while holding key).

But I can't find anything in the API to return i.e. the original quest or dungeon name.
  Reply With Quote
04/23/14, 09:45 AM   #11
Stormknight
 
Stormknight's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 128
It seems that the global variables are loaded with your localised language strings.

I just noticed that Lodur updated the wiki page on the manifest file to include localisation.

http://wiki.esoui.com/Addon_manifest_(.txt)_format
Some variable expansions are available:
localization/$(language).lua
Is there a list of the different language codes around?

- en
- de
- fr

I'm mostly trying to extract the text from the game for my addons wherever possible, so the game does all the localisation for me.
  Reply With Quote
04/23/14, 10:33 AM   #12
Halja
 
Halja's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 116
That is the only three languages supported by the game at this time. It is driven from the game settings on what you play in. During runtime it is stored as a CVar. That is "Language.2" string. This matches the variable name in the setting.txt in the launcher application folder.

Code:
PlayersLanguage = GetCVar("Language.2")
That said you can expand to other languages using your own string lists but the manifest flip won't help you. You will have to track and load all your strings yourself for other languages. Before knowing about the manifest option, I was doing just that for my add-on.

The $(language) is just a variable swapped out. You are free to add text it i.e.
localization/AddonName$(language)IjustLikeLongNames.lua

localization/AddonNameDEIjustLikeLongNames.lua
--Halja
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » The Multilingual Support Thread

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