Multi-languaged website

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
Post Reply
rafalcieslak
On Lightcycle Grid
Posts: 30
Joined: Wed Jul 18, 2007 3:23 pm
Location: win zone

Multi-languaged website

Post by rafalcieslak »

Hello,

The armagetronad.net website is in English only. As the game support multiple languages we should let the user to see the website in his language.
See bugs 312252, 312254, 312255 and 312256. There all are about it!

Luke-Jr suggested the site should automagically recognize browser's language and show the proper site. Indeed, it's a good idea and it does not require too much work.

I am assigned to bug https://bugs.launchpad.net/armagetronad/+bug/312252 and my job is to translate the site to Polish. I've read files in http://armagetronad.svn.sourceforge.net ... /mainsite/ and I found the page well organized.
But I think it's not ready for those improvements. Let's say I've just downloaded the whole source of the site and I've translated it. There is nowhere to put the translated files!

I think we should reorganize the website a bit so that it could work with other languages, not only English.

My solution is quite simple.
First of all, I would rename the file index.php to index_en.php
Secondly, I would create sub-folders like "pl", "de", "fr" for translations.
Then, I would put my translation (and other ones) to those folders. Of course, folders like "screenshots" or "images" doesn't need to be translated, they may be left in root folder.
Finally I would put a new index.php in root folder that recognizes browser's language and redirects to proper site, or, if it is a language we have not prepared yet, it redirects to index_en.php.
Maybe I would add somewhere in header.php a small menu or flag icons to allow the user to change the language manually.

What you think about that? Any comments or suggestion? You're welcome.
use the source...
User avatar
Z-Man
God & Project Admin
Posts: 11589
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Main problem: the downloads. Translations are likely to be out of date, and we can't have that with the downloads page. Well, ok, right now, we can, and it's relatively easy to update a download page even for a language you don't know (all you need to do in our current stable/development/bleeding edge model is update the URIs), but it would be better if the URIs updated themselves.

Then of course there's the thing that for a multilanguage site, you'd want to keep design and content separate, so the design can be changed without changing all translations and that translators can focus on the content and not worry about the design. I don't think we currently do that fully (but may be mistaken, I haven't actually looked a single time at our webpage source).
epsy
Adjust Outside Corner Grinder
Posts: 2003
Joined: Tue Nov 07, 2006 6:02 pm
Location: paris
Contact:

Post by epsy »

The current site is really not ready for that. If we do this now we'll end up with something unmaintainable, and over anything, this is what we don't want.

But yeah, the current website is quite poor(and outdated) and could use of some love...A major redesign for Milestone 0.4 might come handy.
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

epsy wrote:the current website is quite poor
I like the current website.

That aside, while I can appreciate the concept of a multi-lingual site, I don't think it makes particular sense for us in this case. In fact, I can't name any open source game with a multi-lingual site, only commercial games seem to have them. As an example, OpenTTD: translated into over 30 languages, all translations well maintained, but the website is only available in English.

I appreciate the effort you're willing to put in, but my gut feeling is that it's not worth it.
Image
epsy
Adjust Outside Corner Grinder
Posts: 2003
Joined: Tue Nov 07, 2006 6:02 pm
Location: paris
Contact:

Post by epsy »

Tank Program wrote:I like the current website.
Well, hopefully we'll soon publish the fix to that goddamn wallbug, huh? ;)
Luke-Jr
Dr Z Level
Posts: 2246
Joined: Sun Mar 20, 2005 4:03 pm
Location: IM: luke@dashjr.org

Post by Luke-Jr »

AFAIK, Apache will automagically do the language stuff if files are named right.

Sure, separating design from content is a good idea, but IMO not the same bug/issue.

The biggest problem I can see is new news articles.
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

epsy wrote:
Tank Program wrote:I like the current website.
Well, hopefully we'll soon publish the fix to that goddamn wallbug, huh? ;)
Ah, *cough*, good point...
Image
rafalcieslak
On Lightcycle Grid
Posts: 30
Joined: Wed Jul 18, 2007 3:23 pm
Location: win zone

Post by rafalcieslak »

While news are a real problem, I don't think if separating design from translations is a trouble. All the strings (in all languages) on the website can be included in a php file. Then, instead of writing them in html, we could trigger a php function that would return the string in selected language.
use the source...
epsy
Adjust Outside Corner Grinder
Posts: 2003
Joined: Tue Nov 07, 2006 6:02 pm
Location: paris
Contact:

Post by epsy »

http://savannah.nongnu.org/projects/php-gettext/
(do NOT use php's built-in gettext, it SUCKS and requires you to restart apache whenever you change your language strings)
epsy
Adjust Outside Corner Grinder
Posts: 2003
Joined: Tue Nov 07, 2006 6:02 pm
Location: paris
Contact:

Post by epsy »

Luke-Jr wrote:AFAIK, Apache will automagically do the language stuff if files are named right.
Yes, it's something of the form of index.lang.html
Luke-Jr wrote:Sure, separating design from content is a good idea, but IMO not the same bug/issue.
If we don't we'll soon run into other issues.
Post Reply