Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
language/translations vs database load
I am beginner in TXP, then I apologise for this lame question … I noticed, that TXP takes interface language directly from database.
Question: is it connected with additional load of database?
[ I apologize for my poor english ]
Offline
Re: language/translations vs database load
I don’t understand the question.
This is how it works: TXP load XML data for the rpc.textpattern.com server for the language pack, and store it into a MySQL table. Then, when it need it, it will get it from the database (I don’t know if it’s one query per item, cached or not, or if the whole language is loaded in PHP memory and used until PHP release the hand to Apache).
Offline
Re: language/translations vs database load
Jeremie wrote:
(I don’t know if it’s one query per item, cached or not, or if the whole language is loaded in PHP memory and used until PHP release the hand to Apache).
And this is core of my question: how it works? For example: if on page there is ten (10) language strings – is it equals to ten (10) queries to databese?
[ I apologize for my poor english ]
Offline
Re: language/translations vs database load
AFAIK it loads the entire language into a memory array on startup.
Who’s gonna textdrive you home tonight?
Offline
#5 2007-02-03 01:23:28
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: language/translations vs database load
empiryk
mamash is correct. All of the strings of any one language are loaded into memory via a single SQL query very early in TxP’s processing of a request.
— Steve
Offline