> Is there some standard approach using some combination of string tables
> and databases (for dynamic content) for maintaining a multi-lingual
> website?
>I don't think the database is a viable option, because it would either mean too
many SELECTS or enormous SELECT statements.
A lot of the PHP apps guys are positively anal about it (and I guess that's a
good thing). They use lang files, one per language, with $array[elements] or
$prefixedVariables, one per string:
<SNIPPET FROM phpAds>
$strMySQLError = "MySQL-Error:";
$strAdminstration = "Adminstration";
$strAddClient = "Add new client";
$strModifyClient = "Modify client";
$strDeleteClient = "Delete client";
...
</SNIPPET>
You can then set a language to use in the config file, or of course you can have
the user select a preference. Have a look at the other apps on phpwizard.net for
more examples. I think Phorum(.org) uses this method too. However this is for
small(ish) applications, not for whole sites. Still though, if you want to use
the same docs for everything, that would seem to be the way to do it.
Don't forget your images! You have two options here - use a method like the
above or use the PHP image functions to create them on the fly. The first one
would seem to be the easier, faster and most logical route, but the second would
get you some brownie points for effort/coolness, especially if you get the
browser to cache them (easy-peasy really :).
adam
> -----Original Message-----
> From: ilug-admin at linux.ie [mailto:ilug-admin at linux.ie]On Behalf Of Mel
> Sent: 09 June 2000 18:48
> To: ilug at linux.ie> Subject: [ILUG] Multilingual websites
>>>> Has anyone ever had the problem of writing a multilingual website?
>> I'm aware of the browser and apache preference for specifing what language
> you want but I'm more interested in seeing is there a clever way of
> keeping the site in one tree rather than having multple translations of
> the site.
>> Is there some standard approach using some combination of string tables
> and databases (for dynamic content) for maintaining a multi-lingual
> website?
>> Details of possible relevance
>> Language: PHP
> Database: mySQL
> Server: II^H^H Apache :-)
>> Mel
>>> --
> Irish Linux Users' Group: ilug at linux.ie>http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
> List maintainer: listmaster at linux.ie>
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!