![]() |
Phrase system, part two
How would I go about fetching a phrase in code (i.e., not from within a template)?
I am using fetch_phrase(), but it seems to be adding a query for every phrase it translates: Quote:
|
That's what array $phrasegroups is for. Must be initalized before calling global.php so the phrases in this group will be cached.
Only use fetch_phrase or fetch_phrase_group when you really need to use a phrase(group) that has not been cached (which should rarely be the case). Otherwise just use $vbphrase['yourphrase'] |
Quote:
PHP Code:
|
$vbphrase contains all the global phrases as defined in I believe global.php, as well as all of the phrases from the phrasegroups defined in $phrasegroups at the top of the file.
|
Excellent, thank you. :)
|
All times are GMT. The time now is 03:03 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|