Difference: VarMAKETEXT (1 vs. 6)

Revision 62014-01-29 - TWikiContributor

Line: 1 to 1
 
META TOPICPARENT name="TWikiVariables"
Changed:
<
<

MAKETEXT -- creates text using TWiki's I18N infrastructure

>
>

MAKETEXT -- translate text using TWiki's I18N infrastructure

  • Text in MAKETEXT is translated into another language at page view time if the user activates a language other than the default English language.
 
Line: 14 to 15
 
    • %MAKETEXT{"If you have any questions, please contact [_1]." args="%WIKIWEBMASTER%"}%
      expands to
      If you have any questions, please contact 0.
Changed:
<
<
    • %MAKETEXT{"Did you want to [[[_1]][reset [_2]'s password]]?" args="%SYSTEMWEB%.ResetPassword,%WIKIUSERNAME%"}%
>
>
    • %MAKETEXT{"Did you want to ~[~[[_1]~]~[reset [_2]'s password~]~]?" args="%SYSTEMWEB%.ResetPassword, %WIKINAME%"}%
 
expands to
Changed:
<
<
Did you want to reset Main.TWikiGuest's password?
>
>
Did you want to reset TWikiGuest's password?
 
  • Notes:
    • TWiki will translate the string to the current user's language only if it has such string in its translation table for that language.
    • Ampersands (&) followed by one letter (one of a...z, A...Z -- say, X) in the translatable string will be translated to <span class='twikiAccessKey'>X</span>. This is used to implement access keys. If you want to write an actual amperstand that stays just before a letter, write two consecutive amperstands (&&): they will be transformed in just one.
Added:
>
>
    • Square brackets ~[ and ~] in the text have a special meaning and need to be escaped using ~[ and ~], respectively.
 
    • Translatable string starting with underscores (_) are reserved. You must not use translatable phrases starting with an underscore.
Changed:
<
<
    • Make sure that the translatable string is constant. Specially, do not include %VARIABLES% inside the translatable strings (since they will get expanded before the %MAKETEXT{...}% itself is handled).
>
>
    • Make sure that the translatable string is constant. Specially, do not include %VARIABLES% inside the translatable strings - string would not get translated because variables get expanded before the %MAKETEXT{...}% itself is handled.
 
Changed:
<
<
>
>

Revision 52012-11-14 - TWikiContributor

Line: 1 to 1
 
META TOPICPARENT name="TWikiVariables"

MAKETEXT -- creates text using TWiki's I18N infrastructure

Line: 22 to 22
 
    • Ampersands (&) followed by one letter (one of a...z, A...Z -- say, X) in the translatable string will be translated to <span class='twikiAccessKey'>X</span>. This is used to implement access keys. If you want to write an actual amperstand that stays just before a letter, write two consecutive amperstands (&&): they will be transformed in just one.
    • Translatable string starting with underscores (_) are reserved. You must not use translatable phrases starting with an underscore.
    • Make sure that the translatable string is constant. Specially, do not include %VARIABLES% inside the translatable strings (since they will get expanded before the %MAKETEXT{...}% itself is handled).
Added:
>
>

Revision 42010-06-16 - TWikiContributor

Line: 1 to 1
 
META TOPICPARENT name="TWikiVariables"

MAKETEXT -- creates text using TWiki's I18N infrastructure

Line: 16 to 16
  If you have any questions, please contact 0.
    • %MAKETEXT{"Did you want to [[[_1]][reset [_2]'s password]]?" args="%SYSTEMWEB%.ResetPassword,%WIKIUSERNAME%"}%
      expands to
Changed:
<
<
Did you want to reset Main.TWikiGuest's password?
>
>
Did you want to reset Main.TWikiGuest's password?
 
  • Notes:
Changed:
<
<
    • TWiki will translate the string to the current user's language only if it has such string in its translation table for that language.
    • Amperstands (&) followed by one letter (one of a...z, A...Z) (say, X) in the translatable string will be translated to <span class='twikiAccessKey'>X</span>. This is used to implement access keys. If you want to write an actual amperstand that stays just before a letter, write two consecutive amperstands (&&): they will be transformed in just one.
    • translatable string starting with underscores (_) are reserved. You cannot use translatable phrases starting with an underscore.
    • Make sure that the translatable string is constant. Specially, do not include %VARIABLES% inside the translatable strings (since they will get expanded before the %MAKETEXT{...}% itself is handled).
>
>
    • TWiki will translate the string to the current user's language only if it has such string in its translation table for that language.
    • Ampersands (&) followed by one letter (one of a...z, A...Z -- say, X) in the translatable string will be translated to <span class='twikiAccessKey'>X</span>. This is used to implement access keys. If you want to write an actual amperstand that stays just before a letter, write two consecutive amperstands (&&): they will be transformed in just one.
    • Translatable string starting with underscores (_) are reserved. You must not use translatable phrases starting with an underscore.
    • Make sure that the translatable string is constant. Specially, do not include %VARIABLES% inside the translatable strings (since they will get expanded before the %MAKETEXT{...}% itself is handled).

Revision 32007-12-12 - TWikiContributor

Line: 1 to 1
 
META TOPICPARENT name="TWikiVariables"
Deleted:
<
<
 

MAKETEXT -- creates text using TWiki's I18N infrastructure

Changed:
<
<
  • Syntax: %MAKETEXT{"string" args="..."}
>
>
  • Syntax: %MAKETEXT{"string" args="..."}%
 
Line: 15 to 14
 
    • %MAKETEXT{"If you have any questions, please contact [_1]." args="%WIKIWEBMASTER%"}%
      expands to
      If you have any questions, please contact 0.
Changed:
<
<
    • %MAKETEXT{"Did you want to [[[_1]][reset [_2]'s password]]?" args="%TWIKIWEB%.ResetPassword,%WIKIUSERNAME%"}%
>
>
    • %MAKETEXT{"Did you want to [[[_1]][reset [_2]'s password]]?" args="%SYSTEMWEB%.ResetPassword,%WIKIUSERNAME%"}%
 
expands to
Did you want to reset Main.TWikiGuest's password?
  • Notes:

Revision 22006-10-16 - TWikiContributor

Line: 1 to 1
 
META TOPICPARENT name="TWikiVariables"
Changed:
<
<

MAKETEXT -- creates text using TWiki's I18N infrastructure

>
>

MAKETEXT -- creates text using TWiki's I18N infrastructure

 

Revision 12005-03-27 - TWikiContributor

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="TWikiVariables"

MAKETEXT -- creates text using TWiki's I18N infrastructure

  • Syntax: %MAKETEXT{"string" args="..."}
  • Supported parameters:
    Parameter Description Default
    "text" or string="text" The text to be displayed. none
    args="param1, param2" a comma-separated list of arguments to be interpolated in the string, replacing the [_N] placeholders in it. none
  • Examples:
    • %MAKETEXT{string="Notes:"}%
      expands to
      Notes:
    • %MAKETEXT{"If you have any questions, please contact [_1]." args="%WIKIWEBMASTER%"}%
      expands to
      If you have any questions, please contact 0.
    • %MAKETEXT{"Did you want to [[[_1]][reset [_2]'s password]]?" args="%TWIKIWEB%.ResetPassword,%WIKIUSERNAME%"}%
      expands to
      Did you want to reset Main.TWikiGuest's password?
  • Notes:
    • TWiki will translate the string to the current user's language only if it has such string in its translation table for that language.
    • Amperstands (&) followed by one letter (one of a...z, A...Z) (say, X) in the translatable string will be translated to <span class='twikiAccessKey'>X</span>. This is used to implement access keys. If you want to write an actual amperstand that stays just before a letter, write two consecutive amperstands (&&): they will be transformed in just one.
    • translatable string starting with underscores (_) are reserved. You cannot use translatable phrases starting with an underscore.
    • Make sure that the translatable string is constant. Specially, do not include %VARIABLES% inside the translatable strings (since they will get expanded before the %MAKETEXT{...}% itself is handled).
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.VarMAKETEXT.