The text tag is a single tag which is used to return localized language strings from the
txp_lang database table.
Tag will accept the following attributes (case-sensitive) as well as the global attributes :
- Piece of text to display, preferably an item from the
namecolumn of the txp_lang database table. If the given item matches a key in the currently selected site language, the contents of the respective item in the
datacolumn will be returned. Otherwise, whatever you supply as the
itemvalue is returned verbatim.
Example 1: Display some localized text
<txp:older> <txp:text item="older" /> </txp:older>
Replaces the contents of the tag with the value assigned to the name ‘older’ in the current site language. It takes this information from the matching key ‘older’ in the txp_lang database table. So if you were using German
de as the Textpattern site language, you would see a link with the word ‘älter’.
If, however, you had used the
<txp:older> tag tag like this:
<txp:older> Older </txp:older>
then it would always render English text, which is undesirable if your site is changed to show content in a different language.
Other tags used: older.
Accepts L10n replacement tags as attributes.
escape attribute added.