I am currently developing my first multilingual site (what a pain in the A$$).
I have done research on the gettext extension and I've read that every time a new translation is made the server will need to be rebooted so the config file can be loaded again. (If this is not true, please let me know.)
Anyway, because of this I am forced to come up with my own translation code. What I decided on was storing each language in its own file, then using parse_ini_file(), to import the text into my scripts.
This option has been working great, but as I get deeper into the project each language file seems to be growing very quickly. I'm figuring each file (when finished) will be around 1Mb or larger, so...I was wondering if it would be more efficient to store the text in a database and import it with a select statement.
The website uses a MySQL back-end, and I would estimate that over 2/3s of the pages connect to the database; more often than not the db connection already exists, so we don't have to factor in connection overhead, but... into this equation I would also like to consider maintenance time.
If anyone has had previous experience with a similar situation, or can make an educated guess any advice would be appreciated.
Thanks,
Itshim
I have done research on the gettext extension and I've read that every time a new translation is made the server will need to be rebooted so the config file can be loaded again. (If this is not true, please let me know.)
Anyway, because of this I am forced to come up with my own translation code. What I decided on was storing each language in its own file, then using parse_ini_file(), to import the text into my scripts.
This option has been working great, but as I get deeper into the project each language file seems to be growing very quickly. I'm figuring each file (when finished) will be around 1Mb or larger, so...I was wondering if it would be more efficient to store the text in a database and import it with a select statement.
The website uses a MySQL back-end, and I would estimate that over 2/3s of the pages connect to the database; more often than not the db connection already exists, so we don't have to factor in connection overhead, but... into this equation I would also like to consider maintenance time.
If anyone has had previous experience with a similar situation, or can make an educated guess any advice would be appreciated.
Thanks,
Itshim