Page 1 of 1

i18n support

Posted: Thu Mar 27, 2008 19:10
by Lastmerlin
Does CEGUI support some sort of internationalisation ? I can use gettext to change some strings. The problem is, that the font doesn't support some language specific special characters (As i am german i'd like to have an ööööö :D ). Of course i could try to add some extra characters to my font file - then it will support the one additional language.
what i am thinking of is something with loading different font files dynamically based on the localisation.

Posted: Thu Mar 27, 2008 20:00
by scriptkid
CEGUI itself does not support localization, you have to manage this at a higher level.

The problem is, that the font doesn't support some language specific special characters.


This depends on your font(!) As you suggest, you might have multiple font files, or one font which supports more then one language.

In you code you could maintain some language variable, which is now and then used to decide what to do. Instead of loading your fonts through a .scheme file, you could do it from code at runtime.

HTH.

Posted: Fri Mar 28, 2008 20:41
by Rackle
These two wiki entries may be useful to you:

Formatted_Numeric_Data makes use of IBM's ICU to display values in various locales within Cegui. This includes the format of numbers (123,456.78 versus 123.456,78), currencies, local to/from GMT date and time conversions and other gooddies.

There also has been a thread on the subject of creating a multilingual Cegui application. If I remember correctly a language file is read and as a .layout is loaded the labels are changed to the appropriate values for the language. One day it will be found and wikied into an article; this is an important topic for me.

DynamicFont and GameChatBox demonstrate how to use true type fonts in such a way that you can change their size easily i.e. create an arial 10, arial 12, arial 24 without having to manually create .font files.