PDA

View Full Version : Using Phrases Properly


pyro.699
03-02-2009, 09:43 PM
Hello,

Usually when i was making custom mods i built in all of the languages in manually into the styles. Since I'm considering making one to release i was wondering if someone could help me out with managing phrases.

Ive already read how to make your own phrase types (https://vborg.vbsupport.ru/showthread.php?t=117132) and can make my own phrase types.

What i would like to know how to do is say i have something i wanted to display in the "postbit_legacy" style. I know when programming you can use this:


// get special phrase groups
$phrasegroups = array('your_phrase');


I was going to try using

array_push($phrasegroups, 'your_phrase');

and place that inside a plugin and have the hook at showpost_start, but as i looked at other modifications and how they structured everything there seemed to be another way. So i was wondering what exactly i should do to have everything working properly :)

Thanks
~Cody Woolaver

Dismounted
03-03-2009, 04:44 AM
All phrases are fetched en-masse at the start of execution. You need to add your group to that array before they are fetched (find a hook location before the language is fetched).