English / Greek language site

J

James Hutton

I'm trying to write a small (approx 5 page site) for a charity that
works with the Greek community in the UK. I envisaged that having two
copies of the site, one English and one Greek with the user being
directed from a multi-language index page. The charity's hosting package
does not come with any form of database support, are there any other
options not involving two identical, but different sites? ;-)

James
 
N

Nikita the Spider

James Hutton said:
I'm trying to write a small (approx 5 page site) for a charity that
works with the Greek community in the UK. I envisaged that having two
copies of the site, one English and one Greek with the user being
directed from a multi-language index page. The charity's hosting package
does not come with any form of database support, are there any other
options not involving two identical, but different sites? ;-)

James,
First of all, I'd say that using a database for a five page site is
overkill anyway. I'd find it easier to just code an English and Greek
version of each page and be done with it. Sure, that solution doesn't
scale up to 20, 50 or 100 pages very well, but it's quit and it gets the
job done.

Also, you don't need a database to store data, it just makes your life
easier. You can write PHP that reads ordinary files from your server's
hard drive and includes them in HTML templates.

HTH
 
A

Andy Dingley

James said:
I envisaged that having two
copies of the site, one English and one Greek with the user being
directed from a multi-language index page.


Database - overkill

Apache mod_whatsitcalled will do this very easily for you, based on
language settings in the browser. (Do your own searching, I'm not
familiar with the thing). Needs a bit of learning and the right sort of
hosting though.

Simplest and most straightforward though (on a 5 page site) is probably
to just have a directory structure like this and do it all "in
longhand"

\index.html
|
+- english_pages
+- greek_pages
+- shared_images_and_css


Use either SSI or before-publication pre-processing to include standard
boilerplate as needed. Although with good CSS design, your HTML should
be so simple that there's just not much in there that needs to be
boilerplated.
 
J

Jukka K. Korpela

Apache mod_whatsitcalled will do this very easily for you, based on
language settings in the browser.

It would, if browsers helped users to select language settings properly. At
present and in the foreseeable future, language negotiation cannot be relied
on.

In a situation like this, the pages should first be written in one of the
languages (the one the site creator knows better), then translated into the
other, retaining most of the markup as such. Then link the different
versions to each other, and you're almost done. Language negotiation might
be set up as an extra comfort, but in practice, many people who know Greek
better than English still use a browser that has language preferences set to
to English - so they would get a suboptimal version. More info on language
negotiation and why it so often fails:

http://www.cs.tut.fi/~jkorpela/multi/
Simplest and most straightforward though (on a 5 page site) is
probably to just have a directory structure like this and do it all
"in longhand"

\index.html
|
+- english_pages
+- greek_pages
+- shared_images_and_css

That's a good idea, partly because the English and Greek pages probably have
different character encodings, and this is most conveniently implemented
using per-directory settings in .htaccess files on Apache.

It is particularly important to keep the markup clean and simple, delegating
presentational issues to CSS. That way, it is easier to use mostly the same
markup for both versions.
 
A

Andy Dingley

That's a good idea, partly because the English and Greek pages probably have
different character encodings,

I'd keep it to one character encoding throughout - editing is too error
prone otherwise.
 
A

Alan J. Flavell

There are *many* different ways to handle that: it would be difficult
to offer advice - even for this relatively limited requirement - that
would fit every situation.[1]
I'd keep it to one character encoding throughout - editing is too
error prone otherwise.

It's by no means essential to author in the same encoding as the
server will be serving out. As any long-standing Mac user would
be able to confirm.

Am I to assume you're hinting at using utf-8 throughout? If so, then
that's problably quite reasonable nowadays - and has benefits in terms
of any form submissions (using text/textarea) which might be involved.
But I don't think it's the only feasible choice.

Back when I produced [2]
http://ppewww.ph.gla.ac.uk/~flavell/charset/quick.en , and Panos
Stokas produced a translation
http://ppewww.ph.gla.ac.uk/~flavell/charset/quick.el , we didn't
really have that choice - there were still too many old browsers
around for it to be helpful to serve-out utf-8 encoding.

(Use the URL http://ppewww.ph.gla.ac.uk/~flavell/charset/quick to
negotiate your preferred variant).

By the way, if you *do* use utf-8 then the file sizes will be larger
than if you used the language-appropriate 8bit coding such as
iso-8859-7 for Greek. However, that's no big deal, and anyone who
worried about file sizes to that extent could gzip the files (widely
supported by browsers now), or use mod_gzip to accommodate also those
few which didn't.

cheers

[1] At risk of blowing my own trumpet, I'd suggest picking one of
the options set out in my
http://ppewww.ph.gla.ac.uk/~flavell/charset/checklist ,
having regard to any local constraints and issues in making that
choice.

[2] On reviewing these old pages, I see that I've omitted to take my
own later advice, to provide explicit links between the different
language variants. Nobody's perfect...
 
A

Andy Dingley

It's by no means essential to author in the same encoding as the
server will be serving out. As any long-standing Mac user would
be able to confirm.

I agree with that much - I'm thinking of the case where you need to use
two different ISO-8859-* encodings to serve content. That's just a pain
to manage, I'd rather go with UTF-8 throughout. It's not so bad for
English, which has a restricted character set and works fine in almost
any encoding, but I'm currently worrying about simultaneously managing
both Czech and Arabic (and of course English) on a multi-developer
project.
By the way, if you *do* use utf-8 then the file sizes will be larger
than if you used the language-appropriate 8bit coding such as
iso-8859-7 for Greek.

File sizes for text are swamped by your first JPG
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top