how to solve this translation problem?

Started by EnterTheStory (aka tolworthy), Fri 13/02/2009 19:02:22

Previous topic - Next topic

EnterTheStory (aka tolworthy)

In my game I have about two hundred characters and over a thousand hotspots. To simplify responses I sometimes have general purpose responses, and just change the words "it" and "them" depending on if the hotspot is a plural. But this creates problems with translating the game into other languages.

Words like "it" and "them" and "you" don't translate well. My translator keeps asking for more detail about the kind of thing being looked at: in English it's just "that" or "it," but in Dutch (for example) the context matters.

Has anyone else come up against this problem? How have you solved it? How do you create general purpose response code that translates easily?

Trent R

That's just a problem with the current translation system. In the Tech forum, there's all sorts of suggestions on how to improve it for cases such as this, but CJ just hasn't gotten around to it yet.

As for 'workarounds', I'd say to translate it in the most generic form possible... which may not be possible. Also, you could go into your game and change some of the responses (and I don't mean to make them all specific, perhaps just more than there are now).


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

EnterTheStory (aka tolworthy)

Thanks for the reply. I agree that generic is the goal, but it's hard to be generic without using words like "it" :)

DrWhite

I can´t imagine that something like this will be possible. You´d need to have internal information, whether an object is male, female or neutral, also you´d need to define the grammatical form. And still, languages are too different and it would only cause funny, but still false grammar. Just look at online translation software.  :P

Ghost

Quote from: tolworthy on Fri 13/02/2009 19:02:22
In my game I have about two hundred characters and over a thousand hotspots.

Jinx, that's a LOT! In my own WIP I use a "parseGrammar" function to take certain word and assign articles (a/an/some) at runtime- if you plan just one or maybe two languages to translate into, maybe that could be done in your game too? AGS allows you to check what translation is used, and you could script a function for each language and use that, then. It would still be a major task, but togehter with heavy usage of generic responses, it could do the trick.

To illustrate what I mean, here's my basic function:

Code: ags

function simpleParseGrammar()
{
  String t = Game.GetLocationName(mouse.x, mouse.y);
  t = t.Truncate(0);
  t = t.LowerCase();
  if (t == "a" || t == "e" || t == "i" || t == "o" || t == "u")
  {
    Game.GlobalStrings[0] = "an";
  }
  else
  {
    Game.GlobalStrings[0] = "a";
  }
}


and then you can use...

player.Say("It's %s %s.", Game.GlobalStrings[0],  Game.GetLocationName(mouse.x, mouse.y));

Snarky

For "generic" lines that could be applied to more than one thing, you could define an array of versions of the line. Then for each object/hotspot/character, you would have an index to indicate which version to use. You would look up the index in the translation file (or another file distributed along with the translation).

For the English version, you'd usually only need to fill the first entry in each array, and the indices would all be 0.

This should be flexible enough that different languages could define different options depending on their own grammar. Not sure how large the arrays would need to be: most Indo-European languages have at most three noun classes (genders), though you might need to add plurals to that (some things that are singular in English are plural in other languages and vice versa)--annoyingly, some languages have different types of plurals, too; for people, you might have male/female, polite/informal... but seldom at the same time, I think. In practice, you'd probably get pretty far with 3, and 6 should be plenty for all but the most exceptional cases/languages.

Edit: Essentially, this is a more generic version of what Ghost proposed, leaving it up to the translators to define the grammar (filling it in case by case, rather than by a rule... I note that this particular rule fails on words like "hour" and "uranium", so that's probably better anyway).

Jakerpot

well, why can`t you change it just in German? I think no one will notice if you add more details in other language  ;)



EnterTheStory (aka tolworthy)

Thanks for the suggestions. It all sounds like a lot of work. :) I think I'll just go through and reword the generic replies to avoid be even more generic than before. And I'll be a lot more careful with the design of future games, to avoid problems like this.

Regarding the number of languages, I let users translate the game into whatever language they like, and currently have seven languages promised. I'm adding a new game every six months, so I'm keen to make translation as simple as possible. :)

details: http://www.enterthestory.com/languages.html

LUniqueDan

In fact Chris, what you are trying to acheve will be impossible in any latin language (Italian-French-Spanish-Portugeese-Romanian) and all the others who use gender (russian and others).

It's going to be way faster to  rewrite your unhandled events (or let the translators do such) than trying to overturn it using text parser. This (theorical) parser will need to use all the game words just to know which prounoun are going to be place before.

That's an old issues that any french programmer have to dealt with since the 80's. And there's still no easy answers otherwise than rephrasing more robotically some sentences or by manually writing their interractions one by one.  :(

Good luck
"I've... seen things you people wouldn't believe. Destroyed pigeon nests on the roof of the toolshed. I watched dead mice glitter in the dark, near the rain gutter trap.
All those moments... will be lost... in time, like tears... in... rain."

SMF spam blocked by CleanTalk