Contents
Switching Languages
There are several languages built-in to Xastir's menu system. See the selection by typing this in an xterm:
$ xastir -?
Most languages should work by just specifying the "-l <language>" option when starting Xastir. For others you'll need to install/select different fonts to make the menus show up properly (notably Greek language at this point).
Note that once you switch languages in Xastir that setting is "sticky", meaning it is saved in the config file and only changed by specifying the "-l" option again on startup.
Example: Switch to Italian Menus
$ xastir -l Italian &
Example: Switch Back to English Menus
$ xastir -l English &
Example: Switch to Greek Menus
Update: The changes required to add Greek language to Xastir caused issues for others so they were backed-out of the main Xastir code until those problems are solved. For anyone wishing to use Greek language in Xastir there's still a way: Use the https://github.com/we7u/Xastir fork of the Xastir code, switch to the "feature-greeklanguage" branch in Git using "git checkout feature-greeklanguage", compile/install and then follow the instructions below.
The Greek language takes extra steps. Assure you've installed "xfontsel" in your Linux packages. Make sure the Xastir install knows about xfontsel by starting from a "Git" install of Xastir and going through the bootstrap/configure/make/make install procedures.
To make Greek language work you'll need some fonts installed which support Greek characters, probably iso-8859-7. You may already have them installed on your box. Install the fonts using your package manager, then:
Start Xastir with English (the default):
$ xastir -l English &
In Xastir: File->Config->Fonts
Set up the "menu" font by clicking on the Xfontsel button to the right of it. Click on "encoding" in the xfontsel window. Choose encoding of either "Greek" or "7". You may choose other font parameters as well but encoding is the critical one. Click "Select" in the xfontsel window, then "Quit" in the xfontsel window: This sends the font back to the Xastir Fonts window. Click "Ok" in the Xastir Fonts window. Close Xastir, then select the Greek language by:
$ xastir -l Greek &
You should now see Greek in the menus!
Note that we didn't have to set environment variables (like $LC_ALL or $LANG) to make it work.
Generating a New Language File
$ cp language-English.sys language-<NewLanguage>.sys
Edit the file. Change strings in the second column to the new language. Optionally you can change the third column as well, which is the "hotkey" which can also select that option. Make sure there are no duplicates for the hotkey in any particular menu.
The person who wrote the Greek language file used the Windows cp1253 (Greek) character set. I translated it to the ISO8859-7 character set via:
$ konwert wingr-iso7 <language-Greek.sys >language-Greek.sys2
That last file is what I eventually checked into Git for the Xastir project.
If anyone decides to create a new language file for Xastir, please consider donating it to the project. Thanks!
A list of common character encodings:
Also see the man-page for "konwert".