Return to “Technical”

Post

Multiple language pack support?

#1
Something crossed my mind while discussing another game (Fallen Enchantress, to be precise) with a coworker of mine. That game, while highly modable, is only available in English right now, even though it's technically trivially simple to replace the English text with another language. Now, the sheer amount of text is a wholly different ballgame, but the basics are simple enough...

That got me thinking - where does/will LT store its text bits?
I understand most text will be generated procedurally, but even those generators usually have to work from a pool of predefined snippets, words and sentence fragments. Seeing that some people have trouble with the English language, I'd like to see the option for , err, "fan translations" to be implemented into the game via external files. Since there's no voice acting or lipsynching involved, the act creating a different language version is comparatively simple, requiring only a base translation and maybe some minor changes to the HUD layout.

Any word on the feasibility here, Josh?
Hardenberg was my name
And Terra was my nation
Deep space is my dwelling place
The stars my destination
Post

Re: Multiple language pack support?

#2
The standard way to support this is through something like GNU gettext. From a developer's standpoint it primarily means swapping out all of the string literals in your UI layer with calls to gettext (using an appropriate identifier). I've used something similar before and once you get used to it, it's not too bad.

You can even crowdsource the translations at that point. Post up the resource file containing the 'translations' in English language and then speakers of other languages can create alternate versions of that resource file (using the open source gettext translator-editor utility) and submit them.

There's some overhead and I hear gettext has a bit of a learning curve but it's certainly one to consider. The core gettext binaries are LGPL so you can use them freely in non-open-source software as long as either:
  1. You bundle a copy of the gettext source code with the game
  2. You acknowledge (a user manual footnote or mention in LICENSE.txt is fine) that the gettext library is used and provide a URL to the source
Obviously, the second option seems more likely.
Nobody suspects a Toreador …
Post

Re: Multiple language pack support?

#3
I wouldn't mind localized versions of the game. In fact, I would like that. :)

I don't know anything about GNU gettext. But having been working on a German localization for Oolite, where for instance the planet descriptions are made up of procedurally combined text snippets, I also have learned that translating the single words in these snippets is only the very beginning of localization. It's the completely different grammar (= the way these snippets are combined with each other) which produces the headache and makes a successful localization difficult. Much more difficult for procedurally created sentences than for long pre-written blocks of text.
Post

Re: Multiple language pack support?

#4
What you get with something like gettext is the concept of discrete 'messages'. So, a single message is self-contained piece (perhaps sentance or two) of UI text. That message may also have placeholders for dynamic data.

Example: "You dare attack me? {name}, you're Bantha fodder!"

When this is translated, the translator then translates the whole message, including marking the placement of that dynamic data in the message. So in Huttese that might be:

"G'wan-chee doch-bar nooba? Voodoo Bantha proodoo {name}!"

You get the gist anyway ;) It means that the translator is dealing with whole sentances in context each time and skirts around a lot of the potential problems.
Nobody suspects a Toreador …

Online Now

Users browsing this forum: No registered users and 7 guests

cron