Website localization

Ryan Schmidt ryandesign at macports.org
Sat Jan 26 17:07:30 PST 2008


On Jan 26, 2008, at 18:21, Juan Manuel Palacios wrote:

> On Jan 25, 2008, at 3:30 PM, Tetsuya Wada wrote:
>
>> Thank you for providing us the MacPorts. I'm building one of my  
>> Mac mini as a home server. It couldn't be made without the site.  
>> Since the site is so useful, it would be so nice if the site has  
>> Japanese. I'm sure many Japanese users are interested, also.
>>
>> Do you have any plan to publish the site with Japanese as well? If  
>> I could contribute the Japanese translation, it is my pleasure.
>
>
> 	I think it would be great to start localizing our new website,  
> even though at the moment we currently don't have any structured  
> plans for it. I guess it's a great moment to start putting them  
> together ;-)
>
> 	If you're acquainted with subversion and our source repository I'd  
> recommend checking out the trunk/www directory, which is where the  
> website sources live. Have a look at the files there and give it a  
> try translating into Japanese the main section files, like  
> contact.php , index.php, install.php and ports.php, in utf-8 format  
> please. There are others that you'll need to have a fully  
> functional Japanese website, but those will have to be sorted out  
> as we put together the new localization structure within trunk/www  
> (there's trunk/www/localized already, but it's sorely outdated, so  
> don't waste any time looking into that).
>
> 	When you have that initial set of files ready, please submit them  
> as attachments to an appropriate ticket filed under our "Website &  
> Documentation" milestone (http://guide.macports.org/ 
> #project.tickets & http://trac.macports.org/projects/macports/ 
> newticket). I'll suggest a localization hierarchy as I give them a  
> try on my local web server.

I'm in favor of having our web site localized. However, I don't think  
we're at the point where we can start soliciting translations yet.  
Before a web site can be localized (translated into different  
languages), it must be internationalized (engineered so that it can  
be localized). And our web site is very much not. The few times I  
have looked at the web site source, it has struck me that logic and  
presentation and user-visible strings are all mixed together which  
does not lend itself to internationalization. I was going to suggest  
(and forgot before, so I'm mentioning it now) that we remove the  
pretty flag flyout menu from the upper right of the site since it  
doesn't do anything, and can't, until we internationalize.

While working at a web site programming company in Germany for 3  
years, internationalization was one of my specialties. I researched  
available options and we ended up using a PHP-reimplementation of  
gettext in our projects, which I wrote. Message catalogs were edited  
with POEdit. We also had libraries of functions for dealing with  
internationalized representations of dates, times and currency. I'll  
be happy to help internationalize the MacPorts web site. However I  
fear we need some more work before we can start that.

We currently have separate looks and separate code for  
www.macports.org, guide.macports.org, db.macports.org and  
trac.macports.org. I would very much like all of this content to have  
a unified appearance and sensible unified URLs under  
www.macports.org. This is of course difficult since www.macports.org  
is PHP, guide.macports.org is XML, db.macports.org is Ruby, and  
trac.macports.org is Python. Trac can probably be skinned; I'll have  
to read the docs. XML can be restyled with a different XSLT and CSS.  
The main web site can be rewritten. As for the MacPorts DB, I still  
struggle to understand its purpose and its relationship with the  
Available Ports page. Can someone clarify this for me?

Recently I have been interested in the Zend Framework. It is a  
framework for writing PHP web sites, and yes, there are a zillion  
other frameworks out there, but the Zend Framework has the distinct  
advantage of having been written by the same people who wrote the PHP  
language. I watched the tutorial videos and it seems reasonable. It  
includes components for DB access using PDO (something else we should  
be using but aren't), and for localization using gettext or several  
other apparently standard methods (though I haven't tried using these  
components yet). I think it would be good if www.macports.org were  
written to use the Zend Framework. I intend to put together a small  
unrelated web site using Zend Framework to see how it works. Then it  
might be nice to sit down and work out what exactly the site map for  
the MacPorts web experience is. And from that maybe a new  
internationalized web site can emerge.




More information about the macports-dev mailing list