|
Posted by Michael Fesser on 02/06/07 15:07
..oO(P Pulkkinen)
>Hi all, I am in a php development project and I would like to hear your
>opinions on language file practises.
>
>1) One huge or many small?
>====================================
>[...]
>2) "Best" syntax
>====================================
>[...]
My framework is prepared for handling multilingual content. It's not
fully implemented yet, but the backend will most likely be the gettext
extension. I've worked with it in the past and like it.
>3) Or, have someone found a database to be better for some reason
>===============================================
>I don't remember any case from apps I have downloaded, but
>I wouldn't be surprised if SOMEONE somewhere prefers
>this solution.
I also do that, because some parts of the content come from a DB. In my
framework every multilingual table consists of two "physical" tables in
the DB, e.g.
events
eventsI18n
products
productsI18n
sitemap
sitemapI18n
....
The main tables contain all the generic informations like record IDs,
related records in the same or in other tables, dates, prices etc. The
I18n tables hold all the language-specific informations, with one record
per language. Their primary key consists of the record ID, which also
references the record in the main table, and a 'lang' column, containing
a 5-char language code (de-DE for example).
Micha
Navigation:
[Reply to this message]
|