When referencing a phrase in a template, there are two things you have to know.
- The variable name (varname) – this is what uniquely identifies a phrase and how phrases are referenced. Generally, the variable name reflects the phrase text directly; for example, the phrase with variable name poll_timeout has the text of Poll Timeout.
- The phrase group – if the phrase is in a group, you will only be able to access it on pages that load that group. For example, the Polls group is only loaded in poll.php, so if you try to reference poll_timeout in a template that’s loaded on another page, you won’t get any output.
Note:
Some of the following is fairly complex and technical. If you do not wish to add phrases to your templates, then this section does not apply to you.
If the phrase contains variable portions ({1}, {2}, etc), then you will need to use the <phrase> tag. The general syntax for the <phrase> tag is:
<phrase argument_list>$vbphrase[variable_name]</phrase>
- variable_name represents the variable name of the phrase; this part is the same as with simple phrases.
- argument_list represents a list of variables or text that are used to populate variable sections of the phrase. Each argument is in the form of #="value", where # starts at 1 and increases.
<phrase 1="$limitlower" 2="$limitupper" 3="$totalthreads">$vbphrase[showing_threads_x_to_y_of_z]</phrase>
