ReciPants

Open Source Recipe Database

Check It
Home
Features
Screenshots
Demo
Download
Donate

Documentation
Requirements
Installation
FAQ
Overview for Developers
License
Translation
Credits
SF Project Page
 

Translation/Localization Instructions


ReciPants is currently available in English, with Spanish and Danish versions in the works.

You want to translate the ReciPants interface into another language? (It does not mean translating all the recipes!) Kickass! Here's how:


1) Find Your Language Code

Scroll down to Language Codes to get the code for the language that you want to translate ReciPants into.

ReciPants uses the standard ISO 639 two-letter, lower case language codes.


2) Do the Templates

Go to the templates directory. In there will be a few other directories like en and da. Each directory in there is named by the language code of what's inside. (en has the English templates, da has the Danish templates, etc.)

Make a new directory named with the language code of the language you want to translate into (let's say you're translating into Danish, so you make a directory called da).

Copy (don't move) all the files in the directory of the language that you're tranlating FROM into the directory you just made. So for translating from English to Danish, you copy everything in the en directory into the da directory.

Now go into the directory you just made that has the newly copied files in it and translate each HTML file.

Do NOT translate the .xml files

Do NOT change any of the names of the FORM elements or anything that starts with "REP_" or nothing will work!


3) Do the Strings File

Open up the localized_strings.pl file. This contains all of the text that doesn't go in the templates (e.g. if something goes wrong and the program needs to tell you what happened).

In the file, you'll see a bunch of stuff that looks like this:

%ls_ants_in_my_pants = (
	en => 'Got ants in my pants',
	es => 'Tengo hormigas i mi pantalones',
);
		

The "%ls_something" is the name of the variable. (They all start with ls_ for Localized String.)

The en, es, and whatever else parts are the language code again.

The text after the => in the single quotes in the string in that language.

Remember the comma at the end!

If you want to use a ' (single quote) character, you need to put a backslash before it. (If you don't the program will, in technical parlance, "blow up real bad".) For example:

The wrong way:

    en => 'You won't really throw that poo at me!',
		

The right way:

    en => 'You won\'t really throw that poo at me!',
		

So if you want to add a Danish entry, you would add a line with da and the translation:

%ls_ants_in_my_pants = (
	en => 'I got ants in my pants',
	es => 'Yo tengo hormigas i mi pantalones',
	da => 'Jeg har myrener i bukserner',
);
		

4) Update the Supported Languages List

Add your new language code. Look for @supported_languages at neart the top of the localized_strings.pl file and add your new code to the list.


5) Please send me your updated files!

Please email your translated files to me at nick@pantsblazing.com so I can include them in the next release! Be sure to include your name, email address, and Web site URL so I can credit you appropriately! (If you'd rather I not share your email address or URL, just say so.)


That's it! Thanks!


top of page


Language Codes

taken from http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt

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 Faroese
fr French
fy Frisian

ga Irish
gd Scots Gaelic
gl Galician
gn Guarani
gu Gujarati

ha Hausa
he Hebrew (formerly iw)
hi Hindi
hr Croatian
hu Hungarian
hy Armenian

ia Interlingua
id Indonesian (formerly in)
ie Interlingue
ik Inupiak
is Icelandic
it Italian
iu Inuktitut

ja Japanese
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 Sangho
sh Serbo-Croatian
si Sinhalese
sk Slovak
sl Slovenian
sm Samoan
sn Shona
so Somali
sq Albanian
sr Serbian
ss Siswati
st Sesotho
su Sundanese
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

ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek

vi Vietnamese
vo Volapuk

wo Wolof

xh Xhosa

yi Yiddish (formerly ji)
yo Yoruba

za Zhuang
zh Chinese
zu Zulu
	

Technical contents of ISO 639:1988 (E/F)
"Code for the representation of names of languages".

Typed by Keld.Simonsen@dkuug.dk 1990-11-30
Minor corrections, 1992-09-08 by Keld Simonsen
Sundanese corrected, 1992-11-11 by Keld Simonsen
Telugu corrected, 1995-08-24 by Keld Simonsen
Hebrew, Indonesian, Yiddish corrected 1995-10-10 by Michael Everson
Inuktitut, Uighur, Zhuang added 1995-10-10 by Michael Everson
Sinhalese corrected, 1995-10-10 by Michael Everson
Faeroese corrected to Faroese, 1995-11-18 by Keld Simonsen
Sangro corrected to Sangho, 1996-07-28 by Keld Simonsen

Two-letter lower-case symbols are used.
The Registration Authority for ISO 639 is Infoterm, Osterreichisches
Normungsinstitut (ON), Postfach 130, A-1021 Vienna, Austria.


top of page