Hi rubioxtu, thanks, we'll appreciate spanish translation! Keep monitoring this thread, we'll contact you very very soon for help!
@sabit_ertan: Ok, I finally had some time (not really, but I just will sleep less..) to have a look at your code... and I've modified a few things.. mainly to make the code cleaner... for example, I hated seeing :
<?php echo '<br/><br/><li><ul><blablabla><a uri=http://foo.bar>'._SOME_TRANS.'</a></ul></li><etc>'; ?>
I prefered :
<br/><br/><li><ul><blablabla><a uri=http://foo.bar><?php echo _SOME_TRANS; ?> </a></ul></li><etc>
Also, there were a lot of places where you forgot to put the semicolon at the end of the echo.
also the libs/cookies.php was not indented at all!!! So I indented it correctly...
I also removed the code that you had added but commented because it was useless.. if it's unused and useless, remove it!
Anyways, after lots of work, I've got a 'cleaner' version of the code. You can get it from
http://amsn-project.net/~kakaroto/amsn-www.tar.gzPlease use that version for any additional work, this way we avoid having two branches of the code... and I won't have to re-read the whole thing again to see what you changed...
Also note that I didn't really finish everything from it, so I just took some personal notes, but I think you will find them interesting. You'll find them here :
http://www.amsn-project.net/~kakaroto/www/todoRight now, this is the notes I have :
check mysql_session.inc.php change, why add that ?
change includes/side-panel-polls.php (see solution below)
n includes/side-panel-polls.php fix typo it's POLL and not POOL
change includes/news.php (see solution below)
in includes/news.php, what does strftime do and why replace date ? can it respect the locale for date conversion?
maybe clean translations.php.. list of items should be a single multiline translation that gets auto-unrolled with <li>$line</line>
try to avoid having html <tags> in translated data as much as possible (but not necessarily completely remove it)
verify all the changes to stylesheet.css, what are all those changes, what do they do and why were they added?
update developer list
remove donation page
check admin stuff later, seems WIP
check libs/func.lib.php, why replace eregi by preg_match
fix index.php.. list of features should be a single multiline translation that gets auto-unrolled with <li>$line</line>
fix index.php.. the Download/plugins/skins text is overlayed and screws up the image a bit when its hovered (stylesheet issue for my browser?)
fix features.php.. same solution as translations.php and index.php
clean developer.php and remove donation
fix poll_results.php .. typo POLL and not POOL
in linux-downloads.php, fix typo s/INDEPENT/INDEPENDENT/
in linux-downloads.php, the source tarball notice disappeared. readd!
in linux-downloads.php, fix date of tarball to become universal
clean linux-downloads.php
fix skins.php
The system for database translation should be like this :
we keep getting the default key as english, but we'd have one additional table for translations. All tables use an 'id' as the primary key, so we'll use that to our advantage.. let's take for example the 'amsn_poll' database, we would leave it as it is, and do :
SELECT id, question FROM amsn_poll..
then we would do :
SELECT translation FROM amsn_translations WHERE id = $id AND lang = $lang_code AND type = "poll_question"
if we get something, we use that translation instead, if we don't, we keep the default english translation.
So our new amsn_translations table would have 4 columns :
id, type, lang, translation
with the primary key being the tuple (id, type, lang).
In that table we would have translations for (the 'type' column) : poll_question, poll_answer, skin, plugin, news_title, news_text
This makes it much more robust because we always have a value to fallback to, it also does not require modifying the database for every language.. and also, because this is a database, we don't create a column for each language!!! we create a column called 'lang' and put the value in there!!!
How I would see it is that we should be able to later have some way to dump the untranslated stuff, like use an SQL SELECT with a JOIN to quickly find all untranslated keys for a specific language... and automatically generate the 'source xml' where we would only have :
id, original text, translation
and automatically generate a comment in the xml like <--? TODO: untranslated key --?> so that translaters can quickly edit the xml file
Note that they're not all critics, some are just personal notes like "clean this file" because I was lazy to clean it so I want to do it later and don't want to forget... or like why you replaced date by strftime, i'll need to check the php doc to understand the difference, so you don't have to do anything for those points...
However, I really didn't like the way you made the database change.. I believe you may not have a lot of experience with databases, that's why... as a general rule.. once you design your database.. you NEVER change it.. the "alter table" commands are just there to help in case of some big mistake, but they should
never be used once the database is finished and runnning.
So I wrote a different design which should be also pretty fairly simple to implement and which will be much much better design. I've written my ideas on the design in that todo file too, so you could have a look and work on it.
Hopefully, tomorrow, if we fix all this, I'll try to get the website running so we can test it a little!
And once we announce 0.98.1, everyone will be able to enjoy the new multilangual website!

Gotta sleep now.. good night!