Change book | Close bookmaker |
MAKETEXT
macro are automatically mapped to the
current user's selected language via locale/*.po
translation files.
Parameter | Description | Default |
---|---|---|
"text" string="text" |
The text to be displayed (the translatable string). | |
args |
a comma-separated list of arguments to be interpolated in the string, replacing [_N] placeholders in it. |
%MAKETEXT{string="Edit"}%
expands to Edit
%MAKETEXT{"If you have any questions, please contact [_1]." args="%WIKIWEBMASTER%"}%
expands to If you have any questions, please contact damask@mpie.de.
%MAKETEXT{"Did you want to [[[_1]][reset [_2]'s password]]?" args="%SYSTEMWEB%.ResetPassword,%WIKIUSERNAME%"}%
expands to Did you want to reset Main.WikiGuest's password?
[_n]
brackets are validated to a positive integer from 1 to 100.
&
) followed by one ascii alphabetic character (a...z, A...Z) in the translatable string will be expanded to an access key string. For example, &X
will expand to <span class='foswikiAccessKey'>X</span>
. If you want to write an actual ampersand, either follow it with a non-alphabetic character or write two consecutive ampersands (&&
).
_
) are reserved. You cannot use translatable phrases starting with an underscore.
%MACROS%
inside the translatable strings as they will be expanded before the %MAKETEXT{...}%
itself is handled. You can, however, use macros in the args
, as shown in the examples above.
.po
translation file for the current user's selected language.
%MAKETEXT
macro also supports a limited subset of the quant
style bracket notation: %MAKETEXT{string="Edit [*,_1,file]" args="4"}%
expands to Edit 4 files
quant
, numf
or #
are not supported.