Internationalization (i18n) in XaoS
-----------------------------------

Zoltan Kovacs <kovzol@math.u-szeged.hu>

Last modification information:
$Header: /cvsroot/xaos/XaoS/src/i18n/README,v 1.6 2003/02/28 08:58:15 kovzol Exp $



1. INTRODUCTION

As of version 3.1, i18n support is added to XaoS. This is done
with the GNU gettext utility. In this first release only the menus
and most internal strings can be translated, the old method in
../../catalogs haven't changed yet.

Note that i18n cannot be used if you don't have gettext installed
on your system. I used gettext-0.10.37 which works greatly for Linux
and gettext-0.10.40 for DOS version. You do not have to worry
if you are running Linux: gettext is a standard package of most
Linux installation.

Bad news for Windows users: i18n does not work fully for Windows yet,
only in DOS mode. In addition, some Windows support i18n in DOS mode,
some of them not. (In fact in most Windows version I was not able to
force i18n. I had to exit Windows and start native DOS mode. This should
really work under Windows 95.) The main problem is that XaoS works
with static dialogs and Win32 must be a bit rewritten to make
it work.

Unfortunately, under DOS some complex messages are not supported
(press 'l' to check if your gettext version handles all types of
message strings properly).


2. HOW TO INSTALL A NEW LANGUAGE

This will work only on Unix systems.

* Edit ../../configure.in and add your language code into the LINGUAS
variable. This is a 2 letter long code (e.g. "cs" for Czech, "de" for
German).
	
* Type "./configure" in the directory ../.., then come back.

* Type "make new-languages". This will generate a so-called .po-file
  for you (e.g. "cs.po" or "de.po"). 

* Edit the generated file manually. The first 15 lines should be fill in
  properly, otherwise nothing will work in your language. The other lines
  should be also fill in respectively. Note that you only should change
  the "msgstr" rows. See the Hungarian language file, "hu.po" for example.
  Important, that the first "#, fuzzy" line must be removed.

* Type a "make" to generate the so-called .mo-files. These files will be
  installed later to the directory /usr/share/locale/ under Linux
  and ../../locale under Windows/DOS systems. You should have
  superuser rights to install them to their appropriate place with
  the well known statement "make install".

* That's all, start XaoS and enjoy it. ;-)

* Please share your .po-file with the others! You may inform me that a
  new language file was created by you. If it works, we will add it to
  the CVS tree of XaoS as well.


3. EXPERT'S GUIDE

I'm not an expert, I just only want to share my little knowledge with you
if you're interested:

* To set up different languages and try out each one you probably have
  to set the LC_ALL variable. E.g., I had to change it to de_DE or hu_HU
  to test different languages. (On DOS I had to set the variable
  LANG to de or hu, etc.)
	
* Read the gettext howto ("info gettext"). It's quite long, though.

* To internationalize other texts in XaoS, you should edit first the 
  variable CSOURCES in the makefile. Second, each "not static" string
  in these C sources may be internationalized with the gettext()
  function. See the existing tags for example. Again, please share
  your modified code with us.

* Gettext for autoconf is written using a non-standard (but working) way.
  If you find an error, please send a bug report to me.
	

4. FUTURE PLANS

XaoS i18n is not yet finished. I'm working on it in my spare time.
Your help is also welcome.


5. CONTRIBUTORS

* Andreas Madritsch made the German translation and tested i18n very 
  intensively. With his help I made lots of fixes in i18n stuff.

* Martin Dozsa translated menus into Czech.

* Ceser Perez contributed the Spanish translations.

Thanks to everyone!
