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

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

Last modification information:
$Header: /home/jblang/XaoS-cvsbackup/XaoS/src/i18n/README,v 1.8 2008-04-21 05:48:44 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).

* Run autoconf.
	
* 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 filled in
  properly, otherwise nothing will work in your language. The other
  lines should be also filled in respectively. Note that you should
  change the "msgstr" rows only. 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!


6. IMPORTANT NOTES FOR MODERN LINUX SYSTEMS

(Contributed by Á. Fekete and Z. Kovács.)

! Note: the information provided in this section is not valid anymore,
! because XaoS 3.4 already support UTF-8 encodings natively. We don't
! delete this section, however, for historical reasons. ;-)

This section describes how to display Hungarian characters correctly in XaoS
on Ubuntu 7.10. But this may be help on other systems, too. The section should
be useful for other non-English users as well.

XaoS displays Hungarian characters wrongly because the locale is not set well.

1.) So check the output of the following command:

$ locale

and if the locale character set is not ISO-8859-2,
then this should be the problem. In this case,

2.) check if your locale is in /var/lib/locales/supported.d/local
(and /var/lib/locales/supported.d/*) and if not, write a line describing

your locale to the end of these files. That line should be one line of
the file /usr/share/i18n/SUPPORTED, for example:

hu_HU ISO-8859-2

3.) Run

$ sudo dpkg-reconfigure locales

entering your administrative password.

4.) Before running xaos, give this locale to the LC_ALL environment
variable, for example:

$ export LC_ALL=hu_HU

5.) You should be able to run xaos with the menu in readable format,
but the letters õ and û are still not good in the terminal. If you want

to change that and are using gnome-terminal, set the character encoding
to Central European (ISO-8859-2) in the Terminal menu.
