enum ELanguage
{
eLanguage_English,
eLanguage_French,
eLanguage_German,
eLanguage_Spanish,
eLanguage_Amount
};20 years ago this was fine, I was developing on a cartridge that had all the languages essentially loaded at once and really there was no need to support regions beyond the specific languages. These days, however, we need something a little more robust and as you should have picked up from my last post the locale is very important these days. en-US English America
en-GB English Great Britain
es-MX Spanish Mexico
nl-NL Dutch Netherlands
en-CA English Canada
fr-CA French Canada

PRESS_START=Press [Start]
OPTIONS=Options
MUSIC=Music
…fr-FR.lang PRESS_START=Appuie sur [START]
OPTIONS=Options
MUSIC=Musique
…Depending on which language / locale is required at run-time, just that single translation file is loaded into memory. DrawString("Hello World, My name is Mr Flibble.");Instead it should now be written passing a String Identifier like so: DrawString( eStringId_HelloMessage );The string enumerations can be auto generated by the export tool, however I did this for a couple of projects and decided that it was more hassle than it was worth. My recommendation is to avoid this if possible, a better way is to pass the string identifier as a string itself: DrawString( "Hello_Message" );Either way both methods would end up looking into a table to find the specific string to be displayed. Press [START] to continue.
Activate [GEM] by pulling string.Part of my text rendering manager loads a setup file (text again) at startup that contains a list of all the codes and textures to use when that icon is encountered. Very similar to this: START, 0, X360_StartButton.tga
MOVESTICK, 0, X360_LS.tgaI can add additional textures on the line if I wanted to animate the icon for example: DODGE, 4, Wii_RemoteWave_1.tga, Wii_RemoteWave_2.tga, Wii_RemoteWave_3.tgaThe number after the code is the animation speed (FPS). "Use [RS] to aim and [RT] to mark enemy before pressing [A] to fire."Imagine that your project is multi-platform, [A] should really be [X] on the PS3 and [B] on the Wii. An additional issue is that the Wii doesn't generally have a [RS]! You could create a string unique to each platform but that really would just double or triple the amount of data that needs to be maintained as and when things change. "Use [TARGETTING] to aim and [TARGETREGISTER] to mark enemy before
pressing [FIRE] to fire."Then I have a different icon setup file for each platform and everything works between platforms without any major headaches. DrawString("%s! Get rid of them!", m_PlayersName );Now you can see straight away that the %s will be replaced with the players name, however what the translators see is:
"%s! Get rid of them!"Their best guess might be that it is going to be a name of a character but it might also be something else i.e.: "Chairs! Get rid of them!"
"Michael! Get rid of them!"In order to help the translators, I use {} to mark parameters: "{s-Name}! Get rid of them!"
"{s-Object}! Get rid of them!"The context after the '–' is ignored when rendering the text, it is purely descriptive text to help the translators.
| Curri Barcelo |
|
Good briefing. I have two comments:
"Good translators should produce strings in the new language that are roughly the same length as the original string. I usually estimate a rough 20 percent difference between the English and other languages. This is another useful feature I have built into my tool; it can detect excessive differences between the lengths of the various translations" Well, I don't think being a good translator is to be measured by how long your translations are. If you want an accurate translation, a creative translation, a translation that is going to sound natural, sometimes you need to write longer sentences. Other times, the target language might be lucky enough to have just a word for that long sentence in English. Good translators are those who are able to write a target text that doesn't seem a translation but written from scratch by a native. Yes, 20% might be a general idea, but sometimes I have found myself that, in order to keep this 20%, I had to remove information. Or even going further. Some of the standard terminology to follow by the format holders make this task to keep the texts under 20% completely impossible. For example: "stylus". In Spanish is "lápiz táctil". That is 50% longer and I cannot do anything about it to keep it shorten, or Nintendo will not approve your game. Are you saying that NIntendo's translators aren't good enough because they cannot keep their translations below the 20% ;) I think it is always safer to keep the text boxes with a flexible size and advise the translators to please try to keep the sentence shorter. That is what a good developer, who understand about languages, does and a good translator will try to keep that too. "Translators MUST not change the order of parameters in a translation. Obvious from a programming stand point, but I have in the past had translations that not only re-ordered the parameters but added additional ones as well!" If by "parameters" you mean the different variables and bits of coding that are scattered around the text and that will be exchanged by words and elements belonging to the text, I only can say that that is, I'm afraid, impossible, unless we have to invent a new language. Something very simple to explain this. In Spanish, for example, the word modifying any noun will go always after the noun (exept for very specific stylistics reasons). In English it goes before the noun. So: "red car" will become "car red" in Spanish (and probably in French, Italian and other Latin languages). So in this case, I need to be able to change the other. There are more complicated examples, but I just wanted to let you know taht sometimes we are asked impossible tasks. Of coruse, there are things that must stay the same (like those parameters that might englobe the whole sentence, so they are right at the beginning and right at the end of a sentence). Those must not be changed, but only eveything within them. If you have ever received a translation with added parameters or amended parameters that couldn't be changed, the either you haven't coded the game to be properly internationalised (and, therefore, be translated to several languages), or your translators have no idea about games localisation :) If I ever have a doubt about the possibility of moving or swapping a parameter, I will always ask the developer. As you said, communication is very important and it solves many problems very quick. Maybe if a translator asks you if it's possible to swap a parameter and you say "no", then together you can find a solution (either changing the sentence or changing the way it is coded). Bye! :) Curri |
|
|
| Michael Carr-Robb-John |
|
|
Hi Curri,
Thanks for the comment, good feedback. Consider a small to average game might have ~1,000 strings translating that into the basic languages (EFIGS-N) would give us at least six languages which means that potentially there are 6,000 strings. The idea behind the (very rough) 20% check in my tool is to flag up to me personally which strings are most likly to cause problems in the games presentation both in terms of screen space but also timing i.e. audio speech and time taken for the player to read a message. I have never given a translation back just because it failed the 20% check, I have however asked for a shorter translation when the translation is excessive (Which sometimes happens), is too long to fit on screen or in the required space or breaks the momentum of the games pacing. There is a mistake in the article I don't make it obvious that the 20% rule really only applies to sentences and paragraphs, in the case of your "Stylus" single word that wouldn't cause any problems. "I think it is always safer to keep the text boxes with a flexible size and advise the translators to please try to keep the sentence shorter. That is what a good developer, who understand about languages, does and a good translator will try to keep that too." Completely agree with that statement, in fact I think you have just hit on a point that is worth noting. I am a gameplay / A.I. engineer that is my primary focus and what I spend my time doing, when I implemented localisation for the first time (many moons ago) I knew nothing about languages and even today I would never consider myself knowledgable about another language (I have enough problems with just English). But I have experience (through lots of hair pulling) on how to implement localisation in games, this is not an uncommon scenario in the games industry, the people implementing localisation are not language experts we are game play or GUI engineers and our primary focus has always been game play not necessarily translations. In regards to the parameters, If I had the following string: "Hello {s-Name}, Are you {n-Age}?" and the translators returned me any of the following, it would cause problems with the text parsing: "{n-Age} are you?" "{n-Age} are you? Hello {s-Name}" "Hello {s-Name}, Are you {n-Age}? {s-Name}" It's not that we are trying to make your life a pain, it's just the way text is parsed and handled from a programming standpoint. That said however the original posting of this article on http://www.altdevblogaday.com/2012/06/27/localization-pipeline/ has some interesting comments regarding the text parsing that might potentially solve this problem. "There are more complicated examples, but I just wanted to let you know taht sometimes we are asked impossible tasks." It might help you to know that game engineers always set impossible tasks for everyone, it's how we strive to build better games. :) Take it easy, Michael. |
|
|
More: Console/PC, Production