From 3be12a3dcbff56180b2a64bf6f3c9b2fe61c0a12 Mon Sep 17 00:00:00 2001 From: Thomas Jakobi Date: Tue, 13 Feb 2024 09:47:31 +0100 Subject: [PATCH] Fix display of a MODX tag --- en/extending-modx/internationalization.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/en/extending-modx/internationalization.md b/en/extending-modx/internationalization.md index 3a78655a1..2e117b835 100644 --- a/en/extending-modx/internationalization.md +++ b/en/extending-modx/internationalization.md @@ -44,7 +44,7 @@ Lexicons must first be loaded if they are to be used in the front-end; however, To use a Lexicon Entry in a tag, use the following syntax: -``` php +``` [[%key? &topic=`topicname` &namespace=`namespace_name` &language=`en`]] ``` @@ -54,7 +54,9 @@ It is preferable not to use the 'language' property for every tag should you be If you have placeholders in your lexicon string, for example "This is `[[+userinput]]`!", you simply specify the key ("userinput") as tag property and pass what you want it replaced with in the value. Example: -`[[!%key? &topic=`topicname` &namespace=`namespace\_name` &language=`en` &userinput=`amazing`]]` +``` +[[!%key? &topic=`topicname` &namespace=`namespace\_name` &language=`en` &userinput=`amazing`]] +``` Note our ! prefix for the Tag; this makes sure the Tag isn't cached, since our string might be changing before the page cache does.