internationalisation

T

Toby Inkster

WindAndWaves said:
Hmmmm, maybe it is a good idea, it is difficult to setup?

If you have Apache's MultiViews feature turned on, it's as easy as
creating files like:

index.en.html
index.fr.html
index.de.html
index.zh.pdf

Then if you link to just "index" (no extension) Apache will automatically
serve the most appropriate index file based on the user's language as
reported by the browser, and based on why file types the browser can
understand (which is why I threw in a Chinese PDF as an example!)

Of course, it's a good idea to link between them all. So that from
index.en.html there is a link to index.fr.html, index.de.html and
index.zh.pdf -- just in case the auto-detection goes wrong.
 
T

Toby Inkster

WindAndWaves said:
And that is where the problem lies. Almost all of us know how to center a
page horizontally (e.g. <DIV ALIGN=CENTER>), but vertically is a little
trickier.

It's actually pretty easy if you know the height of the thing you want
centred (realistically only embedded objects and elements with the CSS
"overflow:scroll")

element {
position: absolute;
top: 50%;
left: 50%;
height: 120px;
width: 180px;
margin-top: -60px;
margin-left: -90px;
}
 
W

WindAndWaves

Toby Inkster said:
If you have Apache's MultiViews feature turned on, it's as easy as
creating files like:

index.en.html
index.fr.html
index.de.html
index.zh.pdf

Then if you link to just "index" (no extension) Apache will automatically
serve the most appropriate index file based on the user's language as
reported by the browser, and based on why file types the browser can
understand (which is why I threw in a Chinese PDF as an example!)

Of course, it's a good idea to link between them all. So that from
index.en.html there is a link to index.fr.html, index.de.html and
index.zh.pdf -- just in case the auto-detection goes wrong.

Thanks Toby, I will check out if Apache's MultiViews is turned on.

Thanks again.

Nicolaas
 
W

WindAndWaves

Toby Inkster said:
It's actually pretty easy if you know the height of the thing you want
centred (realistically only embedded objects and elements with the CSS
"overflow:scroll")

element {
position: absolute;
top: 50%;
left: 50%;
height: 120px;
width: 180px;
margin-top: -60px;
margin-left: -90px;
}

Dear Toby

I know about this, but why use it if the 100% works better, nevermind the W3
tick? Or do you think I should?
 
T

Toby Inkster

WindAndWaves said:
I know about this, but why use it if the 100% works better, nevermind the W3
tick? Or do you think I should?

Personally I don't care. A page with such a small amount of content that
it can be centred vertically on thw browser canvas is rarely worth visiting
anyway.
 

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,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top