home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
BBS
/
AMC0995.ZIP
/
lib
/
lang
/
README
< prev
Wrap
Text File
|
2004-06-26
|
2KB
|
46 lines
How to add a new language:
You have to know your language code. Currently, the AMC gettext unit
simply takes the first and second character of the environment variable
$AMC_LANG. Examples for this 2-char language codes are
de = German
en = English
nl = French
You can check the currently selected language with the command
echo $AMC_LANG
change this value using
(in bash)
export AMC_LANG=<langcode>
(in csh)
setenv AMC_LANG <langcode>
Then, make a copy of the file "amc_messages.00.po", call the copy
amc_messages.<langcode>.po
(Insert your language code for <langcode>)
After this you can edit the created .po file using your favourite
editor. For each string, there is an "msgid" and an "msgstr" entry.
msgid is an internal string, don't change its value. Just add the
translated string to the "msgstr" line.
When you are finished with your translation, add the language code to
the variable AMCLANGUAGES in the Makefile and do a 'make'. If all goes
well, a file
amc_messages.<langcode>.mo
will be created. This file will be loaded by the AMC program. If
there weren't any errors in your input file, you're finished.
If you don't have 'make', you can make the .mo file with the following
command:
msgfmt -o amc_messages.<langcode>.mo amc_messages.<langcode>.po
If you add a new language, please send the .po file to the author of
AMC to be included in future releases.
Johannes Beekhuizen <jbeekhui@duinheks.xs4all.nl>
With thanks to Michael VanCanneyt for the original gettext unit in FPC
and the original of this README.