d98rolb
05-27-2005, 03:18 PM
I'm considering doing a site with at least 2 languages. I want to do it right from the beginning and use CSS and xhtml. I want to separate the text from the layout in some way so I can easily add more languages after a while.
What's my options here?
I have an idea to use php like this:
<?
if ($_GET["language"] == "swedish")
{
include ("swedish.txt")
}
?>
and call the page with ?language=swedish in the url.
So the swedish.txt may contain the actual Swedish text of the site. But just have each textblock on one row in the file may not work. It's is better to have some id-tag on the www-page and in the language-file. That way I can change position of the textblock at the site.
Any other ideas? Can this be done in pure css?
What's my options here?
I have an idea to use php like this:
<?
if ($_GET["language"] == "swedish")
{
include ("swedish.txt")
}
?>
and call the page with ?language=swedish in the url.
So the swedish.txt may contain the actual Swedish text of the site. But just have each textblock on one row in the file may not work. It's is better to have some id-tag on the www-page and in the language-file. That way I can change position of the textblock at the site.
Any other ideas? Can this be done in pure css?