Re: [PHP] Multi lingual pages
- From: robert@xxxxxxxxxxxxx (Robert Cummings)
- Date: Fri, 26 Jan 2007 15:30:58 -0500
On Fri, 2007-01-26 at 21:25 +0100, Otto Wyss wrote:
Paul Novitski wrote:
I formulated my question in general since I couldn't find an other
message here about supporting multiple languages.
http://www.w3.org/International/articles/Thanks a lot, these are good points for reading.
http://www.w3.org/TR/i18n-html-tech-lang/
http://php.net/setlocale
I'll favor this way especially if several languages have to be provided.
1) Switching language downloads a new version of the current page,
generally with the same markup but new text. Example:
http://partcon.ca/
In both cases I store the text in database tables that contain aI wonder if retrieving static texts from the database draws too much
language field I can select on to match the user's request.
performance. I know from somebody who stores texts in large data arrays
an uses shared memory, yet I haven't figured it out how.
Sure it does, but you can accumulate all the retrieved texts for a page
and cache them so subsequent hits only require a query for the cached
entries. If the page has some translations that may or may not show up
depending on certain values, then you can retrieve the cache, update the
cache with each translation not previously cached and then re-store the
cache. After a while you'll only make 1 query (2 if you're sloppy and
don't check a dirty bit for if the cache actually changed :)
Cheers,
Rob.
--
..------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
.
- References:
- Re: [PHP] Multi lingual pages
- From: Otto Wyss
- Re: [PHP] Multi lingual pages
- Prev by Date: Re: [PHP] Multi lingual pages
- Next by Date: PHP with XML database
- Previous by thread: Re: [PHP] Multi lingual pages
- Next by thread: Re: [PHP] Multi lingual pages
- Index(es):