HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [Resolved] Multi language management  (Read 1095 times)

Acinus

  • World Owners
  • ****
  • Posts: 6
    • View Profile
[Resolved] Multi language management
« on: Sep 04, 12, 05:36:26 AM »

Hello all,

We would like to offer many languages inside our world. So we are thinking about the best way to manage different languages in the GUI.

We did not saw any advice on this subject on the Wiki, may be one of you already did that, or have an idea how to manage that  ?


P.S. For the start we plan 2 languages : Fr and En, but in the future we plan to have 5, so our system need to be able to include more languges later.

Thanks for any help

Zal
« Last Edit: Sep 10, 12, 06:08:43 PM by HE-Cooper »
Logged

Arlohian

  • General Accounts
  • *
  • Posts: 43
    • View Profile
Re: Multi language management
« Reply #1 on: Sep 04, 12, 06:30:37 AM »

I guess you could just place some kind of a universal translate function and use it when displaying any text. Could easily manage infinite ammounts of languages as long as your translator works well.

Example
(havnt actualy tested/compiled it, just coding it right here on the forum :)))
Code: [Select]
method SetUpText()
  label as noderef of class GUILabel = findguicontrolbyname(0, something.something._label
  label.text = somescript::translate_text("Hello world")
.

// or proably an external function... pretty sure there are some libraries for c++ that could auto translate stuff.
shared function translate_text(text as string) as string
  translated_text as string

  // get language from settings
   translated_text  = ...// translate stuff to the language
 return translated_text
.

« Last Edit: Sep 04, 12, 06:32:16 AM by Arlohian »
Logged
Fledgling programmer

Acinus

  • World Owners
  • ****
  • Posts: 6
    • View Profile
Re: Multi language management
« Reply #2 on: Sep 04, 12, 06:53:40 AM »

Thanks for the tip.

How do you think is the best way to save all texts ? As we will have a lot of texts in different languages, how is the best way to save this amount of data in HE ?
Logged

HE-HERB

  • HeroEngine
  • *****
  • Posts: 530
    • View Profile
    • HeroEngine
Re: Multi language management
« Reply #3 on: Sep 04, 12, 06:56:42 AM »

Have you checked out the localization page on the wiki?

Cheers
Logged
herb marselas
graphics guy

PN-Dwight

  • General Accounts
  • *
  • Posts: 465
    • View Profile
    • Pirates' Nest
Re: Multi language management
« Reply #4 on: Sep 04, 12, 07:05:34 AM »

more cumbersome would be that you have an enum for the player defining all languages possible (so it can be set in options) and have your labels and text-fields called depending on that enumeration.

It's a LOT of work, and will make your scripts a lot longer :P

Acinus

  • World Owners
  • ****
  • Posts: 6
    • View Profile
Re: Multi language management
« Reply #5 on: Sep 04, 12, 02:30:34 PM »

Guys thanks a lot, you really helped.

Lot of informations are in "Localization" in wiki, simply i didn't know it was their.

Thanks

Zal
Logged