Tags:
create new tag
view all tags
#VarMAKETEXT ---+++ MAKETEXT -- translate text using TWiki's <nop>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. * Syntax: =%<nop>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: * =%<nop>MAKETEXT{string="Notes:"}%= %BR% expands to %BR% <em> %MAKETEXT{string="Notes:"}% </em> * =%<nop>MAKETEXT{"If you have any questions, please contact [_1]." args="%<nop>WIKIWEBMASTER%"}%= %BR% expands to %BR% <em> %MAKETEXT{"If you have any questions, please contact [_1]." args="%WIKIWEBMASTER%"}% </em> * =%<nop>MAKETEXT{"Did you want to ~[~[<nop>[<nop>_1]~]~[reset [_2]'s password~]~]?" args="%<nop>SYSTEMWEB%.ResetPassword, %<nop>WIKINAME%"}%= %BR% expands to %BR% <em> %MAKETEXT{"Did you want to ~[~[[_1]~]~[reset [_2]'s password~]~]?" args="%SYSTEMWEB%.ResetPassword, %WIKINAME%"}% </em> * __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 (<code>&</code>) followed by one letter (one of =a...z=, =A...Z= -- say, =X=) in the translatable string will be translated to <code><span class='twikiAccessKey'>X</span></code>. 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 (<code>&&</code>): they will be transformed in just one. * Square brackets =~[= and =~]= in the text have a special meaning and need to be escaped using =~[= and =~]=, respectively. * Translatable string starting with underscores (<code>_</code>) are reserved. You *must not* use translatable phrases starting with an underscore. * Make sure that the translatable string is _constant_. Specially, do *not* include <code>%<nop>VARIABLES%</code> inside the translatable strings - string would not get translated because variables get expanded *before* the <code>%<nop>MAKETEXT{...}%</code> itself is handled. * Category: DevelopmentVariables, FormattingAndRenderingVariables * Related: TWiki:Codev.UserInterfaceInternationalisation (on TWiki.org), CPAN:Locale::Maketext (Maketext documentation)
E
dit
|
A
nexar
|
Watch
|
Im
p
rimir
|
H
istórico
: r6
<
r5
<
r4
<
r3
<
r2
|
We
b
|
V
er tópico
|
Ra
w
edit
|
M
ais ações de tópico
Versão do tópico: r6 - 29 Jan 2014
-
TWikiContributor
Home
Site map
Main web
Sandbox web
TWiki web
Web TWiki
User registration
Usuários
Grupos
Índice
Busca
Alterações
Notificações
Fonte RSS
Estatísticas
Preferências
P
Ver
Raw View
Print version
Find backlinks
History
More topic actions
Editar
Editar modo texto
Attach file or image
Editar preferências do tópico
Marcar novo tópico pai
More topic actions
Referência do usuário
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Manutenção Administrativa
Reference Manual
InterWikis
ManagingUsers
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categorias
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Account
Iniciar sessão
Български
Cesky
Dansk
Deutsch
English
Español
_Français_
Italiano
日本語
한글
Nederlands
Polski
Português
Русский
Svenska
简体中文
簡體中文
E
dit
A
nexar
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Idéias, solicitações, problemas com relação ao TWiki?
Nos dê um retorno
Note:
Please contribute updates to this topic on TWiki.org at
TWiki:TWiki.VarMAKETEXT
.