DB has had support for multiple languages since version 0.21. All of
the language-specific strings have been isolated in the seprate
include files in the "langs" subdirectory to make translation easier.

This file documents how a new language translation can be added.

Step #1: Create new language file
---------------------------------

Look in the "langs" subdirectory. You will find several files named
based on the two letter ISO country code. Find the ISO country
language code for your language in the table at the bottom of this
file. Replace CODE in all the following sections with the language
code from the table.

Copy the file "langs/sample.rcp" to "langs/CODE.rcp". Then add the
following line to "db.rcp":

  #include "CODE.rcp"


Step #2: Translate all the strings
----------------------------------

Bring up the file "CODE.rcp" in your favorite text editor. Find the
section bracketed by:

  TRANSLATION "SAMPLE"
  BEGIN
    ...
  END

Change the word "SAMPLE" to the code of the language that you are
providing a translation for. Please use all capital letters for
consistency with the other language translations.

Between the BEGIN and END words, you'll find a series of lines that
look like this:

  "Enter string to search for:" = "Enter string to search for:"

The first string tells the build system what to look for. The second
string is what you need to translate. For example, the German
translation turned the above line into this:

  "Enter string to search for:" = "Suchtext eingeben:"


Step #3: Telling the build system about your translation
--------------------------------------------------------

Bring up the file "Makefile" in a text editor. This is the file that
controls the compilation of DB. Find the section that looks like this:

  db-sample.prc: ts-grc ts-bin-sample
          build-prc db-sample.prc "DB" DBOS *.grc *.bin

Copy these two lines and then change every occurrence of the word
"sample" in the section to your language code. Use lower case for the
language code here.

Next, find the section that looks like this:

  ts-bin-sample: db.rcp
          rm -f *.bin ts-bin*
          pilrc -I langs -L SAMPLE db.rcp
          touch ts-bin-sample

Again, copy this section and change every occurrence of "sample" to
the language code. Use lower case except for the one spot where there
is a reference to "SAMPLE" in upper case.


Step #3: Building a translated copy of DB
-----------------------------------------

At a command prompt, you can build a translated copy of DB using the
command:

  make db-CODE.prc

Replace CODE with the code of the language that you want to get a
version of DB for.

That's it! :)


ISO Language Codes
------------------

aa Afar
ab Abkhazian
af Afrikaans
am Amharic
ar Arabic
as Assamese
ay Aymara
az Azerbaijani

ba Bashkir
be Byelorussian
bg Bulgarian
bh Bihari
bi Bislama
bn Bengali; Bangla
bo Tibetan
br Breton

ca Catalan
co Corsican
cs Czech
cy Welsh

da danish
de german
dz Bhutani

el Greek
en English
eo Esperanto
es Spanish
et Estonian
eu Basque

fa Persian
fi Finnish
fj Fiji
fo Faeroese
fr French
fy Frisian

ga Irish
gd Scots Gaelic
gl Galician
gn Guarani
gu Gujarati

ha Hausa
hi Hindi
hr Croatian
hu Hungarian
hy Armenian

ia Interlingua
ie Interlingue
ik Inupiak
in Indonesian
is Icelandic
it Italian
iw Hebrew

ja Japanese
ji Yiddish
jw Javanese

ka Georgian
kk Kazakh
kl Greenlandic
km Cambodian
kn Kannada
ko Korean
ks Kashmiri
ku Kurdish
ky Kirghiz

la Latin
ln Lingala
lo Laothian
lt Lithuanian
lv Latvian, Lettish

mg Malagasy
mi Maori
mk Macedonian
ml Malayalam
mn Mongolian
mo Moldavian
mr Marathi
ms Malay
mt Maltese
my Burmese

na Nauru
ne Nepali
nl Dutch
no Norwegian

oc Occitan
om (Afan) Oromo
or Oriya

pa Punjabi
pl Polish
ps Pashto, Pushto
pt Portuguese

qu Quechua

rm Rhaeto-Romance
rn Kirundi
ro Romanian
ru Russian
rw Kinyarwanda

sa Sanskrit
sd Sindhi
sg Sangro
sh Serbo-Croatian
si Singhalese
sk Slovak
sl Slovenian
sm Samoan
sn Shona
so Somali
sq Albanian
sr Serbian
ss Siswati
st Sesotho
su Sudanese
sv Swedish
sw Swahili

ta Tamil
te Telugu
tg Tajik
th Thai
ti Tigrinya
tk Turkmen
tl Tagalog
tn Setswana
to Tonga
tr Turkish
ts Tsonga
tt Tatar
tw Twi

uk Ukrainian
ur Urdu
uz Uzbek

vi Vietnamese
vo Volapuk

wo Wolof

xh Xhosa

yo Yoruba

zh Chinese
zu Zulu
