Show a message when the article is not in the correct language. |
|
| see prefix, zena 1.0 | |
Conditional text to display when the visitor’s language does not match the current version’s language.
Display the default ‘[fr]’ string:
<r:wrong_lang/> some other text
Customize the string to display on wrong language:
<r:wrong_lang text='(article in #{trans(v.lang)}) '/>some other text
You can also use wrong_lang as a conditional block:
<r:wrong_lang>Warning: this is not an article in your mother's tongue</r:wrong_lang> some other text
As with all conditional blocks, you can use the ‘else’ clause to display text only when the languages match:
<r:wrong_lang>Warning: this is not an article in your mother's tongue<r:else>Easy to read</r:else></r:wrong_lang> some other text