Re: Epiphany homepage



On Thu, 2005-02-10 at 15:24 +0100, Reinout van Schouwen wrote:
> Hi Victor,
> 
> On Thu, 10 Feb 2005, Victor Osadci wrote:
> 
> > Adam sent a nice fix to be used with .htaccess - see the bottom of the
> > page:
> > http://www.xml.com/pub/a/2003/03/19/dive-into-xml.html
> 
> Hmm, I tried that, and epiphany started showing the xhtml as plain text 
> again. Perhaps it's our old apache server (1.3.x) at fault.

Well, mod_rewrite would have to exist. And it'd have to be called
".html", not ".xhtml", if you take those rules literally.

I've never actually tried doing stuff that way. I have some HTML and
some XHTML pages on my server, and all my stuff uses PHP. So I use the
following code:

    // FIXME: don't send application/xhtml+xml if ;q=0 is present....
    if (!empty ($_SERVER['HTTP_ACCEPT'])
        && preg_match ('@application/xhtml\+xml@',
$_SERVER['HTTP_ACCEPT']))
    {
        header("Content-type: application/xhtml+xml; charset=utf-8");
    }

> I wasn't planning on connecting to a database, just using the gettext 
> functionality to create .po files just like for the rest of epiphany.
> If you know a different way to do that, please tell me :).

.po files aren't really made for large chunks of text like web pages, I
don't think. Maybe writing one giant XML file in all languages and using
XSLT to generate the individual language pages would be the way to go.
(Then again, the downside is that it's a maintenance problem for
translators. I'm just suggesting the possibility, not saying it's the
best.)

By the way, by default Apache serves ".html.en", ".html.fr", ".html.de",
etc, depending on the browser's language settings. So you don't have to
worry about detecting languages if you go that route (or another,
similar route).

-- 
Adam Hooper <adamh densi com>

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]