You are here: Re: Your opinion on best language file practise? « PHP Programming Language « IT news, forums, messages
Re: Your opinion on best language file practise?

Posted by Michael Fesser on 02/06/07 15:33

..oO(P Pulkkinen)

>"Michael Fesser" <netizen@gmx.de> wroite
>>
>> 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.
>
>Is your framework open source :-)

Nope. It's just for private use and my personal "playground". I already
use it on some small production sites, but some parts of it are still
experimental or not fully implemented.

>> 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.
>
>Thanks. Outside of language thing, I would like to know, how this kinf of
>sister tables are declared in mysql. Or do you just manually keep their
>indexing in harmony, removing and inserting records at the same time to both
>tables.

Removing and updating records can be handled by the DB itself, using
FOREIGN KEY constraints (I can post an example if necessary). Inserting
new records requires a bit more action, but is usually done with a
script, not by hand.

>I ask this, because somethimes this kind of need rises up. For
>example, I could like to have a very minimalistic users-table and then have
>additional sister tables that are related to some specific installation or
>some extra module.

You can define what should happen in the sister tables if something in
the main table is changed or removed (in MySQL this requires the InnoDB
storage engine):

CREATE TABLE sisterTable (
...
FOREIGN KEY (recordId)
REFERENCES mainTable (recordId)
ON UPDATE CASCADE
ON DELETE CASCADE
) ENGINE=InnoDB;

Micha

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация