# Celestia/Internationalization

From v1.5, Celestia fully supports internationalization (often abbreviated as i18n). Celestia i18n is processed using gettext, a service that allows for translation between different languages.
All the strings used in the program can be translated. For each language, the list of strings and their translation is saved in a .po file.

## Using Celestia in another language

Celestia should automatically change the language it uses based on the computer's language. However, if you do not want to switch your computer's language and region, you can specially open Celestia using the command line:

### MacOS X

* Open Terminal.
* Change the directory using cd to the directory that has Celestia (the Unix executable file).
* Type ./Celestia -AppleLanguages '(aa)', where aa refers to the language code, for example es being Spanish.
* Press Enter.

### Windows

* Open Command Prompt (cmd.exe)
* Change the directory using cd to the directory that has Celestia
* Type set LC_MESSAGES=aa, where aa is the language code, and press Enter
* Type celestia and press Enter

## Getting .po files

The .po files can be downloaded from the Celestia GitHub repository or from the table in the 'Celestia translation overview' section below.

## Editing .po files

The .po files can be edited using the following software:
* Poedit: for MacOS, Linux and Windows.
* KBabel: for KDE

## Updating existing .po files

The already existing .po files for a language can easily be updated to the latest version by using the celestia.pot. In poEdit this can be done with the command "Catalog/Update from POT file". This results then in the program showing a list of removed and changed or newly introduced strings. But be advised that the creation date of the .po file internally is not updated. KBabel should also have such a mechanism.

## Creating a new .po file

* Download the celestia.pot file from the GitHub repository.
* Rename it using the ISO 639-1 code of your language.
* Edit it as described in the above 'Editing .po files' section.

## Adding completed .po files to Celestia

Either:
* Join https://www.transifex.com/celestia/celestia/ as your language translator and upload your file.
* Create a new pull-request to our repository on Github
* Or simply send .po files to someone of developers

## Building internationalization files from the source in MS Windows

* Follow the Celestia build for Win 32 platform as described in Celestia/Development/Win32 platform. It is assumed that Celestia's source is in "c:\celestia" and other programs are installed in c drive, too.
* Install perl (e.g. ActivePerl) and POEdit for Windows
* Add path for POEdit (e.g. C:\Program Files\Poedit\bin). This is for msgfmt.
* Open Windows command console (cmd.exe)
* Execute "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat"
* Change directory with "cd C:\celestia\celestia\po" command
* Run "perl translate_resources.pl". The translate_resources.pl script does:
** translate resource files from po files -> src/celestia/rc/celestia_LL.rc
** build dll files -> src/celestia/rc/celestia_LL.res -> locale/res_LL.dll
** compile catalogs -> locale/LL/LC_MESSAGES/celestia[_constellations].mo

## Building .txf font texture files

Celestia uses its own .txf font textures to display the OpenGL overlay text. Some non-Latin characters may be missing from the font textures wich are distributed with the standard Celestia package, though. In that case, please use the following process to build celestia .txf font textures from standard .ttf fonts:
* Download the txf utilities from http://www.shatters.net/~claurel/stuff/txfutil.tar.gz (dead link)
** This link has source code for what are probably the same utilities.
* Generate the .txf files:
This will create the following font textures which should be placed in the font/ dir:
* sans12_LL.txf
* sans14_LL.txf
* sansbold20_LL.txf.
Note for Windows users:
* A pre-compiled version of ttf2txf is available at: http://gvince.perso.sfr.fr/celestia/dev/ttf2txf.zip
* The codepoints_LL.txt file is generated by running the translate_resources.pl perl script from the po/ dir. See Building internationalization files from the source in MS Windows section above.

## Celestia translation overview

The translation process currently applies to Celestia 1.6.1 (development version).
>> Last celestia.pot file update: 2010-01-04

### Main .po files

| Language | File | Translated | Fuzzy | Untranslated | Revision Date | Last Translator |
| ar | ar.po | 58% | 335 | 83 | 2006-06-05 | saudilink@lycos.com |
| be | be.po | 100% | 0 | 0 | 2010-11-15 | 375gnu@gmail.com |
| bg | bg.po | 68% | 284 | 30 | 2008-01-27 | kumbarov@gmail.com |
| de | de.po | 100% | 0 | 0 | 2010-01-29 | celestia-deutsch@gmx.net |
| el | el.po | 86% | 128 | 2 | 2010-01-25 | ckouz@uom.gr |
| es | es.po | 100% | 0 | 0 | 2010-01-25 | abramson@cab.cnea.gov.ar |
| fr | fr.po | 100% | 0 | 0 | 2010-02-25 | gvince@sfr.fr |
| gl | gl.po | 100% | 0 | 0 | 2010-04-08 | xabiercs@terra.com |
| hu | hu.po | 100% | 0 | 0 | 2010-04-19 | zoltanszekely@hotmail.com |
| it | it.po | 100% | 0 | 0 | 2010-03-31 | gvince@sfr.fr |
| ja | ja.po | 100% | 0 | 0 | 2010-03-13 | aqua@aqsp.net |
| ko | ko.po | 100% | 0 | 0 | 2010-03-13 | blcktgr73@gmail.com |
| lt | lt.po | 100% | 0 | 0 | 2010-03-02 | neoromancer@gmail.com |
| lv | lv.po | 95% | 46 | 0 | 2010-02-06 | sg30022@lanet.lv |
| nl | nl.po | 100% | 0 | 0 | 2010-03-28 | myckel@sdf.lonestar.org |
| no | no.po | 100% | 0 | 0 | 2010-12-05 | FreewareTips |
| pl | pl.po | 100% | 0 | 0 | 2010-02-05 | hippie_1968@hotmail.com |
| pt | pt.po | 74% | 246 | 4 | 2009-01-13 | zeraeiro@gmail.com |
| pt_BR | pt_BR.po | 100% | 0 | 0 | 2010-04-03 | igorborgo@gmail.com |
| ro | ro.po | 74% | 246 | 4 | 2008-12-28 | oanaradu32@queeq.com |
| ru | ru.po | 100% | 0 | 0 | 2010-11-28 | leserg@ua.fm |
| sk | sk.po | 100% | 0 | 0 | 2010-04-13 | acelists@atlas.sk |
| sv | sv.po | 99% | 0 | 2 | 2010-03-27 | po@danielnylander.se |
| tr | tr.po | 28% | 0 | 681 | 2011-01-02 | kde-i18n-doc@kde.org |
| uk | uk.po | 100% | 0 | 0 | 2010-01-24 | yurchor@ukr.net |
| zh_CN | zh_CN.po | 100% | 0 | 0 | 2010-04-047 | markerzli@gmail.com |
| zh_TW | zh_TW.po | 100% | 0 | 0 | 2010-03-13 | iychiang1809@gmail.com |

### Constellation names .po files

| Language | File | Translated | Fuzzy | Untranslated | Revision Date | Last Translator |
| ar | ar.po | 98% | 0 | 1 | 2006-06-05 | saudilink@lycos.com |
| be | be.po | 100% | 0 | 0 | 2010-11-02 | 375gnu@gmail.com |
| bg | bg.po | 100% | 0 | 0 | 2007-12-19 | kumbarov@gmail.com |
| de | de.po | 100% | 0 | 0 | 2006-02-07 | schreiberste@web.de |
| el | el.po | 100% | 0 | 0 | 2009-05-08 | ckouz@uom.gr |
| en | en.po | 100% | 0 | 0 | 2005-08-06 | chris@teyssier.org |
| es | es.po | 100% | 0 | 0 | 2006-02-03 | ElChristou |
| fr | fr.po | 100% | 0 | 0 | 2008-11-23 | vince.gian@free.fr |
| gl | gl.po | 100% | 0 | 0 | 2010-04-08 | xabiercs@terra.es |
| hu | hu.po | 100% | 0 | 0 | 2009-01-15 | zoltanszekely@hotmail.com |
| it | it.po | 100% | 0 | 0 | 2006-08-11 | mausan66@tiscali.it |
| ja | ja.po | 100% | 0 | 0 | 2006-08-07 | aqua@aqsp.net |
| ko | ko.po | 100% | 0 | 0 | 2010-01-26 | jaeuck@gmail.com |
| lt | lt.po | 100% | 0 | 0 | 2008-12-04 | neoromancer@gmail.com |
| lv | lv.po | 100% | 0 | 0 | 2006-12-14 | sg30022@lanet.lv |
| nl | nl.po | 100% | 0 | 0 | 2006-08-02 | myckel@sdf.lonestar.org |
| no | no.po | 100% | 0 | 0 | 2010-12-05 | FreewareTips |
| pl | pl.po | 100% | 0 | 0 | 2008-10-21 | hippie_1968@hotmail.com |
| pt | pt.po | 100% | 0 | 0 | 2006-12-30 | zeraeiro@gmail.com |
| pt_BR | pt_BR.po | 100% | 0 | 0 | 2009-02-18 | igorborgo@gmail.com |
| ro | ro.po | 100% | 0 | 0 | 2008-12-28 | oanaradu32@queeq.com |
| ru | ru.po | 100% | 0 | 0 | 2006-05-27 | leserg@ua.fm |
| sk | sk.po | 100% | 0 | 0 | 2010-02-28 | acelists@atlas.sk |
| sv | sv.po | 100% | 0 | 0 | 2006-02-21 | po@danielnylander.se |
| uk | uk.po | 100% | 0 | 0 | 2008-??-?? | dubyk@library.lviv.ua |
| zh_CN | zh_CN.po | 100% | 0 | 0 | 2006-08-09 | zhaozhengxu@yahoo.com |
| zh_TW | zh_TW.po | 100% | 0 | 0 | 2009-08-10 | alchen@tam.gov.tw |

## Other localizable files

The following files can be localized too: controls.txt, COPYING, demo.cel, guide.cel, start.cel. These files can be edited using a simple text editor. For UTF-8 encoding, please consider using, e.g., notepad++ Once the translation is completed, just rename the file as controls_LL.txt, COPYING_LL, demo_LL.cel, guide_LL.cel, start_LL.cel, where LL represents the ISO 639-1 code of your language.
Once the translation is completed, these files can be sent to team@celestia.space.
| Language | | | Localized Files | | |
| bg | controls_bg.txt | COPYING_bg | | guide_bg.cel | start_bg.cel |
| be | controls_be.txt | | demo_be.cel | guide_be.cel | start_be.cel |
| de | controls_de.txt | COPYING_de | demo_de.cel | guide_de.cel | start_de.cel |
| es | controls_es.txt | COPYING_es | demo_es.cel | guide_es.cel | start_es.cel |
| fr | controls_fr.txt | COPYING_fr | demo_fr.cel | guide_fr.cel | start_fr.cel |
| gl | controls_gl.txt | COPYING_gl | demo_gl.cel | guide_gl.cel | start_gl.cel |
| hu | | | | | start_hu.cel |
| it | controls_it.txt | COPYING_it | demo_it.cel | guide_it.cel | start_it.cel |
| ja | controls_ja.txt | COPYING_ja | demo_ja.cel | guide_ja.cel | start_ja.cel |
| ko | controls_ko.txt | COPYING_ko | demo_ko.cel | guide_ko.cel | start_ko.cel |
| lt | | | demo_lt.cel | guide_lt.cel | start_lt.cel |
| lv | | | demo_lv.cel | | start_lv.cel |
| nl | controls_nl.txt | COPYING_nl | demo_nl.cel | guide_nl.cel | start_nl.cel |
| no | controls_no.txt | | demo_no.cel | | |
| pl | controls_pl.txt | COPYING_pl | demo_pl.cel | guide_pl.cel | start_pl.cel |
| pt | controls_pt.txt | COPYING_pt | demo_pt.cel | guide_pt.cel | start_pt.cel |
| pt_BR | controls_pt_BR.txt | COPYING_pt_BR | demo_pt_BR.cel | guide_pt_BR.cel | start_pt_BR.cel |
| ru | controls_ru.txt | COPYING_ru | demo_ru.cel | guide_ru.cel | start_ru.cel |
| sk | controls_sk.txt | | demo_sk.cel | guide_sk.cel | start_sk.cel |
| sv | controls_sv.txt | COPYING_sv | demo_sv.cel | guide_sv.cel | start_sv.cel |
| tr | | | demo_tr.cel | | |
| uk | controls_uk.txt | COPYING_uk | demo_uk.cel | guide_uk.cel | start_uk.cel |
| zh_CN | controls_zh_CN.txt | COPYING_zh_CN | demo_zh_CN.cel | guide_zh_CN.cel | start_zh_CN.cel |
| zh_TW | controls_zh_TW.txt | COPYING_zh_TW | demo_zh_TW.cel | guide_zh_TW.cel | start_zh_TW.cel |