Sign in to follow this  
Roots

Internalization techniques for game designers

Recommended Posts

I did a search for a thread like this and surprisingly couldn't find anything. I was curious whether or not anyone has experience/advice for making a game that is easily multi-lingual. I want to have multilingual support for my game and we've got a framework down, but I was hoping to get some outside device. My game is: - Cross-platform (Linux, FreeBSD, Windows, Mac...) - Written in C++ - Uses SDL API - Uses Lua for scripting/data storage - Uses OpenGL and FGLT for rendering text At the main screen there will be a "languages" option menu where you can select whichever of the available languages you desire. Whenever a routine for drawing text is called, it looks up the appropriate language script file and renders the text. I know SDL has a function to enable unicode, but I believe that is only for handling input from multiple keyboard configurations (correct me if I'm wrong). So the two issues that I'm most curious about right now are: 1) What about non-roman languages like Japanese, Chinese, Korean, etc.? I'd like to be able to support those types of languages as well. 2) How do you (= the experienced guy reading this) handle variable text-lengths? Like, say for example I have a menu that is a maximum of 80 pixels long and says "Strategy". In another language that might translate to "Wachhhabile whoakae", which wouldn't fit. Do you write routines to automatically detect this condition and re-size the font appropriately? But wouldn't resizing the font for just one item on the menu make it look bad? Thanks for any knowledge that you share, I appreciate it! [Edited by - Roots on January 6, 2005 1:54:07 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Roots
1) What about non-roman languages like Japanese, Chinese, Korean, etc.? I'd like to be able to support those types of languages as well.

I haven't tried it myself, so I can't back up its usefulness, but this should cover Unicode strings. Of course, you'd also need a text renderer that supports Unicode and a Unicode font.

Quote:
2) How do you (= the experienced guy reading this) handle variable text-lengths? Like, say for example I have a menu that is a maximum of 80 pixels long and says "Strategy". In another language that might translate to "Wachhhabile whoakae", which wouldn't fit. Do you write routines to automatically detect this condition and re-size the font appropriately? But wouldn't resizing the font for just one item on the menu make it look bad?

I'd personally just base the width of the menu on that of the widest menu item (after all, there aren't many languages with words that need as many characters as 'supercalifragilisticexpialidocious'), but if that's really not an option, the only other alternatives I can think of are:
Make all menu items use smaller fonts in that language.
Abbreviate words (ew...)
Use an alternative, shorter word that doesn't have the same meaning as the original, but still conveys what would happen if you'd select that menu item (eg. 'Items' instead of 'Inventory').

Share this post


Link to post
Share on other sites
1) As long as you use [and SDL textout supports] unicode, and a font which contains the characters needed [warning: some don't!]

2) In my current game project, I use D3DXFont, which allows me to get the size of the text, no matter the font or content. The menu creation routines then order things into nice lists or tables [as with multiple resolutions, you can't know where exactly things are going to go]. Also note that some languages do not read left to right, top to bottom!

I'm sure there's an even better way to do this, but I'm not so experienced with it.

Also, the proper terminology to look up these issues is "internationalization" [the process of allowing code to exist in different locales] and "localization" [the process of translating text, changing currencies, changing time zones, and tons of other little things to make the product usable by a 'local']

And yes, about half of my professional time over the past year has been spent doing enterprise internationalization testing and localization verification. I'll try to answer any more specific questions you have.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this