CINXE.COM

plugin:textinsert [DokuWiki]

<!DOCTYPE html> <html lang="en" dir="ltr" class="no-js"> <head> <meta charset="utf-8" /> <title>plugin:textinsert [DokuWiki]</title> <meta name="generator" content="DokuWiki"/> <meta name="theme-color" content="#008800"/> <meta name="robots" content="index,follow"/> <meta name="keywords" content="plugin,textinsert"/> <link rel="search" type="application/opensearchdescription+xml" href="/lib/exe/opensearch.php" title="DokuWiki"/> <link rel="start" href="/"/> <link rel="contents" href="/plugin:textinsert?do=index" title="Sitemap"/> <link rel="manifest" href="/lib/exe/manifest.php"/> <link rel="alternate" type="application/rss+xml" title="Recent Changes" href="/feed.php"/> <link rel="alternate" type="application/rss+xml" title="Current namespace" href="/feed.php?mode=list&amp;ns=plugin"/> <link rel="edit" title="Edit this page" href="/plugin:textinsert?do=edit"/> <link rel="alternate" type="text/html" title="Plain HTML" href="/_export/xhtml/plugin:textinsert"/> <link rel="alternate" type="text/plain" title="Wiki Markup" href="/_export/raw/plugin:textinsert"/> <link rel="canonical" href="https://www.dokuwiki.org/plugin:textinsert"/> <link rel="stylesheet" href="/lib/exe/css.php?t=dokuwiki&amp;tseed=f1005bad3d81fc9c803c7f93d32a390e"/> <script >var NS='plugin';var JSINFO = {"plugins":{"edittable":{"default columnwidth":""}},"id":"plugin:textinsert","namespace":"plugin","ACT":"show","useHeadingNavigation":0,"useHeadingContent":0};(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js" defer="defer"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.2/jquery-ui.min.js" defer="defer"></script> <script src="/lib/exe/js.php?t=dokuwiki&amp;tseed=f1005bad3d81fc9c803c7f93d32a390e&amp;lang=en" defer="defer"></script> <meta name="viewport" content="width=device-width,initial-scale=1" /> <link rel="shortcut icon" href="/lib/tpl/dokuwiki/images/favicon.ico" /> <link rel="apple-touch-icon" href="/lib/tpl/dokuwiki/images/apple-touch-icon.png" /> <meta name="verify-v1" content="OVxl3gsCv2MhZqh1cBQyl0JytWXSwXMjyvwc+4w3WtA=" /> <meta name="google-site-verification" content="YhTVK69hW94ZXUtc2zSLPxTkZKbZIn0zK67mz5WQB-E" /> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-83791-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-83791-1', { 'anonymize_ip': true }); </script> </head> <body> <div id="dokuwiki__site"><div id="dokuwiki__top" class="site dokuwiki mode_show tpl_dokuwiki showSidebar hasSidebar"> <!-- ********** HEADER ********** --> <header id="dokuwiki__header"><div class="pad group"> <div class="headings group"> <ul class="a11y skip"> <li><a href="#dokuwiki__content">skip to content</a></li> </ul> <h1 class="logo"><a href="/start" accesskey="h" title="Home [h]"><img src="/lib/tpl/dokuwiki/images/logo.png" width="64" height="64" alt="" /><span>DokuWiki</span></a></h1> <p class="claim">It's better when it's simple</p> </div> <div class="tools group"> <!-- USER TOOLS --> <div id="dokuwiki__usertools"> <h3 class="a11y">User Tools</h3> <ul> <li class="action login"><a href="/plugin:textinsert?do=login&amp;sectok=" title="Log In" rel="nofollow"><span>Log In</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 17.25V14H3v-4h7V6.75L15.25 12 10 17.25M8 2h9a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2v-4h2v4h9V4H8v4H6V4a2 2 0 0 1 2-2z"/></svg></a></li> </ul> </div> <!-- SITE TOOLS --> <div id="dokuwiki__sitetools"> <h3 class="a11y">Site Tools</h3> <form action="/start" method="get" role="search" class="search doku_form" id="dw__search" accept-charset="utf-8"><input type="hidden" name="do" value="search" /><input type="hidden" name="id" value="plugin:textinsert" /><div class="no"><input name="q" type="text" class="edit" title="[F]" accesskey="f" placeholder="Search" autocomplete="on" id="qsearch__in" value="" /><button value="1" type="submit" title="Search">Search</button><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form> <div class="mobileTools"> <form action="/doku.php" method="get" accept-charset="utf-8"><div class="no"><input type="hidden" name="id" value="plugin:textinsert" /><select name="do" class="edit quickselect" title="Tools"><option value="">Tools</option><optgroup label="Page Tools"><option value="edit">Edit this page</option><option value="revisions">Old revisions</option><option value="backlink">Backlinks</option></optgroup><optgroup label="Site Tools"><option value="recent">Recent Changes</option><option value="media">Media Manager</option><option value="index">Sitemap</option></optgroup><optgroup label="User Tools"><option value="login">Log In</option></optgroup></select><button type="submit">&gt;</button></div></form> </div> <ul> <li class="action recent"><a href="/plugin:textinsert?do=recent" title="Recent Changes [r]" rel="nofollow" accesskey="r">Recent Changes</a></li><li class="action media"><a href="/plugin:textinsert?do=media&amp;ns=plugin" title="Media Manager" rel="nofollow">Media Manager</a></li><li class="action index"><a href="/plugin:textinsert?do=index" title="Sitemap [x]" rel="nofollow" accesskey="x">Sitemap</a></li> </ul> </div> </div> <!-- BREADCRUMBS --> <div class="breadcrumbs"> <div class="trace"><span class="bchead">Trace:</span> <span class="bcsep">•</span> <span class="curid"><bdi><a href="/plugin:textinsert" class="breadcrumbs" title="plugin:textinsert">textinsert</a></bdi></span></div> </div> <hr class="a11y" /> </div></header><!-- /header --> <div class="wrapper group"> <!-- ********** ASIDE ********** --> <nav id="dokuwiki__aside" aria-label="Sidebar"><div class="pad aside include group"> <h3 class="toggle">Sidebar</h3> <div class="content"><div class="group"> <p> <strong>Learn about DokuWiki</strong> </p> <ul> <li class="level1"><div class="li"> <a href="/features" class="wikilink1" title="features" data-wiki-id="features">Features</a> &amp; <a href="/blogroll" class="wikilink1" title="blogroll" data-wiki-id="blogroll">reviews</a> </div> </li> <li class="level1"><div class="li"> <a href="/install" class="wikilink1" title="install" data-wiki-id="install">Installation guide</a></div> </li> <li class="level1"><div class="li"> <a href="/manual" class="wikilink1" title="manual" data-wiki-id="manual">User manual</a> &amp; <a href="/wiki:syntax" class="wikilink1" title="wiki:syntax" data-wiki-id="wiki:syntax">syntax</a></div> </li> <li class="level1"><div class="li"> <a href="/changes" class="wikilink1" title="changes" data-wiki-id="changes">Release notes</a></div> </li> <li class="level1"><div class="li"> <a href="/faq" class="wikilink1" title="faq" data-wiki-id="faq">FAQ</a></div> </li> </ul> <p> <strong>Advanced Use</strong> </p> <ul> <li class="level1"><div class="li"> <a href="/extensions" class="wikilink1" title="extensions" data-wiki-id="extensions">Extensions</a></div> </li> <li class="level1"><div class="li"> <a href="/development" class="wikilink1" title="development" data-wiki-id="development">Development manual</a></div> </li> </ul> <p> <strong>Corporate Use</strong> </p> <ul> <li class="level1"><div class="li"> <a href="/faq:support" class="wikilink1" title="faq:support" data-wiki-id="faq:support">Get support</a></div> </li> <li class="level1"><div class="li"> <a href="/donate" class="wikilink1" title="donate" data-wiki-id="donate">Donations</a></div> </li> </ul> <p> <strong>Our Community</strong> </p> <ul> <li class="level1"><div class="li"> <a href="/teams:getting_involved" class="wikilink1" title="teams:getting_involved" data-wiki-id="teams:getting_involved">Get involved</a></div> </li> <li class="level1"><div class="li"> <a href="/dokuinstall" class="wikilink1" title="dokuinstall" data-wiki-id="dokuinstall">Users</a></div> </li> <li class="level1"><div class="li"> <a href="http://forum.dokuwiki.org" class="urlextern" title="http://forum.dokuwiki.org">User forum</a></div> </li> <li class="level1"><div class="li"> <a href="/mailinglist" class="wikilink1" title="mailinglist" data-wiki-id="mailinglist">Development mailinglist</a></div> </li> </ul> <hr /> <p> Follow us on <a href="https://phpc.social/@dokuwiki" class="urlextern" title="https://phpc.social/@dokuwiki">Mastodon</a> and other <a href="/social" class="wikilink1" title="social" data-wiki-id="social">social networks</a>. </p> <p> <a href="/privacy" class="wikilink1" title="privacy" data-wiki-id="privacy">Our Privacy Policy</a> </p> </div></div> </div></nav><!-- /aside --> <!-- ********** CONTENT ********** --> <main id="dokuwiki__content"><div class="pad group"> <div class="pageId"><span>plugin:textinsert</span></div> <div class="page group"> <!-- wikipage start --> <!-- TOC START --> <div id="dw__toc" class="dw__toc"> <h3 class="toggle">Table of Contents</h3> <div> <ul class="toc"> <li class="level1"><div class="li"><a href="#textinsert_plugin">TextInsert Plugin</a></div> <ul class="toc"> <li class="level2"><div class="li"><a href="#installation">Installation</a></div></li> <li class="level2"><div class="li"><a href="#examples_usage">Examples/Usage</a></div> <ul class="toc"> <li class="level3"><div class="li"><a href="#basic_syntax">Basic Syntax</a></div></li> <li class="level3"><div class="li"><a href="#macro_inclusions">Macro Inclusions</a></div></li> <li class="level3"><div class="li"><a href="#entity_inclusions">Entity Inclusions</a></div></li> <li class="level3"><div class="li"><a href="#standard_namespace_macros">Standard Namespace Macros</a></div></li> <li class="level3"><div class="li"><a href="#example_of_multi_paragraph_text_block">Example of Multi Paragraph Text Block</a></div></li> <li class="level3"><div class="li"><a href="#screen_shot_of_edit_panel">Screen Shot of Edit Panel</a></div></li> </ul> </li> <li class="level2"><div class="li"><a href="#syntax">Syntax</a></div></li> </ul> </li> <li class="level1"><div class="li"><a href="#expanded_functionality">Expanded Functionality</a></div> <ul class="toc"> <li class="level2"><div class="li"><a href="#parameter_interpolation">Parameter Interpolation</a></div> <ul class="toc"> <li class="level3"><div class="li"><a href="#basic_syntax1">Basic Syntax</a></div></li> <li class="level3"><div class="li"><a href="#dokuwiki_basic_text_formatting_syntax">DokuWiki Basic Text Formatting Syntax</a></div></li> <li class="level3"><div class="li"><a href="#multi-line_syntax">Multi-line Syntax</a></div></li> </ul> </li> <li class="level2"><div class="li"><a href="#language_translation">Language Translation</a></div> <ul class="toc"> <li class="level3"><div class="li"><a href="#example">Example</a></div></li> <li class="level3"><div class="li"><a href="#improved_language_localization">Improved Language Localization</a></div></li> <li class="level3"><div class="li"><a href="#embedding">Embedding</a></div></li> </ul> </li> <li class="level2"><div class="li"><a href="#configuration_and_settings">Configuration and Settings</a></div></li> <li class="level2"><div class="li"><a href="#development">Development</a></div></li> <li class="level2"><div class="li"><a href="#discussion">Discussion</a></div></li> </ul></li> </ul> </div> </div> <!-- TOC END --> <h1 class="sectionedit1" id="textinsert_plugin">TextInsert Plugin</h1> <div class="level1"> <div class="pluginrepo_entry"><div class="usageInfo"><div class="compatibility"><p class="label">Compatible with DokuWiki</p><div class="versions"><ul><li class="">2024-02-06 "Kaos"&nbsp;<strong><span>unknown</span></strong></li><li class="">2023-04-04 "Jack Jackrum"&nbsp;<strong><span>unknown</span></strong></li><li class="yes">2022-07-31 "Igor"&nbsp;<strong><span>yes</span></strong></li><li class="yes">2020-07-29 "Hogfather"&nbsp;<strong><span>yes</span></strong></li></ul></div></div><ul class="actions"><li><a class="download" href="https://github.com/turnermm/TextInsert/zipball/master">Download</a></li><li><a class="bugs" href="https://github.com/turnermm/TextInsert/issues">Report bugs</a></li><li><a class="donate" href="http://mturner.org/userfiles/donate.php">Donate</a></li></ul><div class="clearer"></div></div><div class="mainInfo"><p class="description"><a class="media" href="/plugins"><img alt="plugin" class="medialeft" src="/lib/plugins/pluginrepo/images/dwplugin.png" width="60" height="60" /></a> Replace macro variables with words, phrases, paragraphs, and include other macros, and entities, in the macro definitions</p></div><div class="metaInfo"><dl><dt>Last updated on</dt><dd>2019-10-03</dd><dt>Provides</dt><dd><a href="/plugins?plugintype=1#extension__table" class="wikilink1" title="List all Syntax plugins">Syntax</a></dd><dt>Repository</dt><dd><a class="urlextern" href="https://github.com/turnermm/TextInsert">Source</a></dd></dl></div><div class="moreInfo"><p class="similar">Similar to <a href="/plugin:easyvar" class="wikilink1" title="plugin:easyvar" data-wiki-id="plugin:easyvar">easyvar</a>, <a href="/plugin:fields" class="wikilink1" title="plugin:fields" data-wiki-id="plugin:fields">fields</a>, <a href="/plugin:instructions" class="wikilink1" title="plugin:instructions" data-wiki-id="plugin:instructions">instructions</a>, <a href="/plugin:kixovar" class="wikilink1" title="plugin:kixovar" data-wiki-id="plugin:kixovar">kixovar</a>, <a href="/plugin:macros" class="wikilink1" title="plugin:macros" data-wiki-id="plugin:macros">macros</a>, <a href="/plugin:phpwikify" class="wikilink1" title="plugin:phpwikify" data-wiki-id="plugin:phpwikify">phpwikify</a>, <a href="/plugin:replace" class="wikilink1" title="plugin:replace" data-wiki-id="plugin:replace">replace</a></p><p class="tags">Tagged with <a href="/plugins?plugintag=entities#extension__table" class="wikilink1" title="List all plugins with this tag">entities</a>, <a href="/plugins?plugintag=entity#extension__table" class="wikilink1" title="List all plugins with this tag">entity</a>, <a href="/plugins?plugintag=macro#extension__table" class="wikilink1" title="List all plugins with this tag">macro</a>, <a href="/plugins?plugintag=replace#extension__table" class="wikilink1" title="List all plugins with this tag">replace</a></p></div><div class="authorInfo"><strong>By <a href="mailto:turnermm02%20%5Bat%5D%20shaw%20%5Bdot%5D%20ca" class="mail" title="turnermm02 [at] shaw [dot] ca">Myron Turner</a></strong><ul><li><a href="/plugin:htmlokay" class="wikilink1" title="plugin:htmlokay" data-wiki-id="plugin:htmlokay">htmlokay</a></li> <li><a href="/plugin:codedoc" class="wikilink1" title="plugin:codedoc" data-wiki-id="plugin:codedoc">codedoc</a></li> <li><a href="/plugin:charpicker" class="wikilink1" title="plugin:charpicker" data-wiki-id="plugin:charpicker">charpicker</a></li> <li><a href="/plugin:credits" class="wikilink1" title="plugin:credits" data-wiki-id="plugin:credits">credits</a></li> <li><a href="/plugin:snippets" class="wikilink1" title="plugin:snippets" data-wiki-id="plugin:snippets">snippets</a></li> <li><a href="/plugin:vkeyboard" class="wikilink1" title="plugin:vkeyboard" data-wiki-id="plugin:vkeyboard">vkeyboard</a></li> <li><a href="/template:simple_sidebar" class="wikilink1" title="template:simple_sidebar" data-wiki-id="template:simple_sidebar">simple_sidebar</a></li> <li><a href="/plugin:dwcommits" class="wikilink1" title="plugin:dwcommits" data-wiki-id="plugin:dwcommits">dwcommits</a></li> <li><a href="/plugin:block" class="wikilink1" title="plugin:block" data-wiki-id="plugin:block">block</a></li> <li><a href="/plugin:nodisp" class="wikilink1" title="plugin:nodisp" data-wiki-id="plugin:nodisp">nodisp</a></li> <li>and 24 more</li></ul></div></div> </div> <div class="secedit editbutton_section editbutton_1"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[TextInsert Plugin] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="textinsert_plugin" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="1-813" /><button type="submit" title="TextInsert Plugin">Edit</button></div></form></div> <h2 class="sectionedit2" id="installation">Installation</h2> <div class="level2"> <p> Search and install ​the plugin using the <a href="/plugin:extension" class="wikilink1" title="plugin:extension" data-wiki-id="plugin:extension">Extension ​Manager</a>. If you cannot use the DokuWiki download Manager to install this plugin, install it manually. Refer to <a href="/plugin_installation_instructions#manual_instructions" class="wikilink1" title="plugin_installation_instructions" data-wiki-id="plugin_installation_instructions">manual instructions</a> for how to install plugins manually. </p> </div> <div class="secedit editbutton_section editbutton_2"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Installation] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="installation" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="814-1125" /><button type="submit" title="Installation">Edit</button></div></form></div> <h2 class="sectionedit3" id="examples_usage">Examples/Usage</h2> <div class="level2"> <p> This plugin provides an administrative panel where you enter macro names and their substitution texts. These are saved in the meta directory (in <code>meta/macros/macros.ser</code>). In farms, you can choose to have a database for each animal (see: <a href="#configuration_and_settings" title="plugin:textinsert ↵" class="wikilink1">configuration_and_settings</a>). You can save individual words, and strings of text, including lengthy paragraphs. The substitutions accept html, quotation marks and other punctuation. The macro names can accept spaces, dots, underscores and hyphens. </p> <p> So, <code>Macro_1.txt</code> is a valid macro name and could, for instance, have the following substitution: <code>/var/usr/lib/php/readme.txt</code>. </p> <p> You could have a footer message, <code>FOOTER-1</code>, which has the following text substitution: </p> <pre class="code">All Roads Lead to &quot;Here&quot; except for the ones which don&#039;t</pre> <p> The textinsert plugin will allow you to create macros for extended texts. You can create paragraph length texts with <abbr title="HyperText Markup Language">HTML</abbr> markup which has to be repeated on multiple pages. If you want the <abbr title="HyperText Markup Language">HTML</abbr> to be rendered as such, then the macro name must have the _<abbr title="HyperText Markup Language">HTML</abbr> suffix: </p> <pre class="code">Macro_HTML </pre> <p> <strong>Note</strong>: The underscore is required. </p> </div> <div class="secedit editbutton_section editbutton_3"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Examples/Usage] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="examples_usage" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="1126-2268" /><button type="submit" title="Examples/Usage">Edit</button></div></form></div> <h3 class="sectionedit4" id="basic_syntax">Basic Syntax</h3> <div class="level3"> <pre class="code"> #@MACRO_NAME@# </pre> </div> <div class="secedit editbutton_section editbutton_4"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Basic Syntax] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="basic_syntax" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="2269-2312" /><button type="submit" title="Basic Syntax">Edit</button></div></form></div> <h3 class="sectionedit5" id="macro_inclusions">Macro Inclusions</h3> <div class="level3"> <p> Some of the functionality of this plugin at its simplest can be implemented with DokuWiki&#039;s own entities facility: <a href="/entities" class="wikilink1" title="entities" data-wiki-id="entities">entities</a>. But for complex substitutions and for control over where and how substitutions are made, Textinsert offers a wide variety of solutions and techniques. </p> <p> One advantage of TextInsert comes when dealing with extended blocks of text and with its ability to include other macros inside the primary macro definition. That is, it can accept: </p> <pre class="code">MACRO_1 This macro can include #@MACRO_2@# inside it. MACRO_2 a second macro</pre> <p> The result of using <code>#@MACRO_1@#</code> is: </p> <pre class="code">This macro can include a second macro inside it.</pre> <p> It accepts only one level of macro inclusion, so that if MACRO_3 were included in MACRO_2, MACRO_3 would not be rendered. If an include macro requires treatment as <abbr title="HyperText Markup Language">HTML</abbr>, then the primary macro must be named as an <abbr title="HyperText Markup Language">HTML</abbr> macro. </p> </div> <div class="secedit editbutton_section editbutton_5"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Macro Inclusions] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="macro_inclusions" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="2313-3209" /><button type="submit" title="Macro Inclusions">Edit</button></div></form></div> <h3 class="sectionedit6" id="entity_inclusions">Entity Inclusions</h3> <div class="level3"> <p> TextInsert will also accept entities in its macro definitions. These are defined in dokuwiki/conf/entities.conf and dokuwiki/conf/entities.local.conf. Entities will be replaced in included macros as well as in the primary macro. For instance, if MACRO_2 above were defined as follows, using DokuWiki&#039;s long dash entity: </p> <pre class="code">MACRO_2 a second---macro---</pre> <p> The final result would be: This macro can include a second—macro—inside it. </p> </div> <div class="secedit editbutton_section editbutton_6"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Entity Inclusions] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="entity_inclusions" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="3210-3682" /><button type="submit" title="Entity Inclusions">Edit</button></div></form></div> <h3 class="sectionedit7" id="standard_namespace_macros">Standard Namespace Macros</h3> <div class="level3"> <p> Textinsert will accept namespace replacement patterns, as used in DokuWiki namespace templates. See <a href="/namespace_templates#replacement_patterns" class="wikilink1" title="namespace_templates" data-wiki-id="namespace_templates">Namespace Templates</a> for the list of these. Textinsert can accept all but the MAIL and NAME macros, which go out of scope when the page is saved. Like regular textinsert macros these can also be embedded in other textinsert macros; see <a href="#macro_inclusions" title="plugin:textinsert ↵" class="wikilink1">macro_inclusions</a>. For instance, a macro named current_user and a user named jack: </p> <div class="table sectionedit8"><table class="inline"> <thead> <tr class="row0"> <th class="col0 leftalign"> Macro </th><th class="col1 leftalign"> Definition </th> </tr> </thead> <tr class="row1"> <td class="col0 leftalign"> current_user </td><td class="col1 leftalign"> The Current user is #@USER@# </td> </tr> </table></div> <div class="secedit editbutton_table editbutton_8"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Table] " /><input type="hidden" name="target" value="table" /><input type="hidden" name="hid" value="table" /><input type="hidden" name="range" value="4192-4299" /><button type="submit" title="Table">Edit</button></div></form></div> <p> This would give you: <code>The Current user is jack</code>. </p> <p> There is a configuration option which governs whether or not standard namespace macros are accepted. It is set to true by default. </p> </div> <h4 id="id_and_nspseudo_namespace_macros_for_sidebars">_ID_ and _NS_: Pseudo Namespace Macros for Sidebars</h4> <div class="level4"> <p> When used in a sidebar the standard namespace macro <code>ID</code> resolves to the id of the sidebar page. To get the id of the currently displayed page, use instead <code>_ID_</code>, of the currently displayed namespace <code>_NS_</code>. These macros can also be used for <a href="#macro_inclusions" title="plugin:textinsert ↵" class="wikilink1">macro_inclusions</a>. So, for instance if you wanted to display the result as a wiki link, you could do this: </p> <pre class="code html4strict"><span class="sc2">&lt;<a href="http://december.com/html/4/element/a.html"><span class="kw2">a</span></a> <span class="kw3">href</span><span class="sy0">=</span><span class="st0">&quot;/mywiki/doku.php?id=#@_ID_@#&quot;</span> <span class="kw3">class</span><span class="sy0">=</span><span class="st0">&quot;wikilink1&quot;</span>&gt;</span>#@_ID_@#<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/a.html"><span class="kw2">a</span></a>&gt;</span></pre> <p> If you use <code>_ID_</code> or <code>_NS_</code> in your sidebar, then you must also insert the <code>~~NOCACHE~~</code> macro into the page so that the ID updates with each change of page. See <a href="/wiki:syntax#control_macros" class="wikilink1" title="wiki:syntax" data-wiki-id="wiki:syntax">control_macros</a>. </p> </div> <div class="secedit editbutton_section editbutton_7"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Standard Namespace Macros] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="standard_namespace_macros" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="3683-5210" /><button type="submit" title="Standard Namespace Macros">Edit</button></div></form></div> <h3 class="sectionedit9" id="example_of_multi_paragraph_text_block">Example of Multi Paragraph Text Block</h3> <div class="level3"> <p> If you want to create multi-pragraph blocks, then you need to use the <abbr title="HyperText Markup Language">HTML</abbr> paragraph tag, &lt;P&gt;. . .&lt;/P&gt;. The textinsert plugin will accept paragraphs like the the following, which is the introductory header found on the textinsert administration page: </p> <pre class="code html4strict"><span class="sc2">&lt;<a href="http://december.com/html/4/element/h2.html"><span class="kw2">H2</span></a>&gt;</span>Info<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/h2.html"><span class="kw2">H2</span></a>&gt;</span> <span class="sc2">&lt;<a href="http://december.com/html/4/element/p.html"><span class="kw2">p</span></a>&gt;</span> This panel enables you to add and delete macros and their replacement texts, and to edit them after they have been saved. A macro name can contain letters, numbers, underscores, hyphens and periods. For example:<span class="sc1">&amp;nbsp;&amp;nbsp;</span><span class="sc2">&lt;<a href="http://december.com/html/4/element/tt.html"><span class="kw2">TT</span></a>&gt;</span>Macro_one.txt<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/tt.html"><span class="kw2">TT</span></a>&gt;</span> The replacement texts can accept HTML and can be of any length. <span class="sc2">&lt;<a href="http://december.com/html/4/element/p.html"><span class="kw2">p</span></a>&gt;</span> You can add up to six macros at a time. The sixth is a text area which will allow for extended texts. Enter the macro name in the <span class="sc2">&lt;<a href="http://december.com/html/4/element/b.html"><span class="kw2">b</span></a>&gt;</span>Macro<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/b.html"><span class="kw2">b</span></a>&gt;</span> column and the texts which they represent in the <span class="sc2">&lt;<a href="http://december.com/html/4/element/b.html"><span class="kw2">b</span></a>&gt;</span>Substitution<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/b.html"><span class="kw2">b</span></a>&gt;</span> column. <span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/p.html"><span class="kw2">p</span></a>&gt;</span> <span class="sc2">&lt;<a href="http://december.com/html/4/element/p.html"><span class="kw2">p</span></a>&gt;</span> Deletions are unlimited; check off the box(es) next the macro(s) to be deleted and click the Delete button at the bottom of the screen. Editing is done through the Edit screen, where you are presented with all your macros. You can edit the texts of any number of macros. <span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/p.html"><span class="kw2">p</span></a>&gt;</span></pre> </div> <div class="secedit editbutton_section editbutton_9"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Example of Multi Paragraph Text Block] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="example_of_multi_paragraph_text_block" /><input type="hidden" name="codeblockOffset" value="1" /><input type="hidden" name="range" value="5211-6376" /><button type="submit" title="Example of Multi Paragraph Text Block">Edit</button></div></form></div> <h3 class="sectionedit10" id="screen_shot_of_edit_panel">Screen Shot of Edit Panel</h3> <div class="level3"> <p> <a href="/lib/exe/fetch.php?tok=0893c3&amp;media=https%3A%2F%2Fi.imgur.com%2F8zMF7Ik.png" class="media" title="https://i.imgur.com/8zMF7Ik.png"><img src="/lib/exe/fetch.php?tok=0893c3&amp;media=https%3A%2F%2Fi.imgur.com%2F8zMF7Ik.png" class="media" loading="lazy" alt="" /></a> </p> </div> <div class="secedit editbutton_section editbutton_10"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Screen Shot of Edit Panel] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="screen_shot_of_edit_panel" /><input type="hidden" name="codeblockOffset" value="2" /><input type="hidden" name="range" value="6377-6450" /><button type="submit" title="Screen Shot of Edit Panel">Edit</button></div></form></div> <h2 class="sectionedit11" id="syntax">Syntax</h2> <div class="level2"> <pre class="code">#@macro_name@#</pre> <pre class="code">#@Macro_HTML@#</pre> <p> In the second format, <abbr title="HyperText Markup Language">HTML</abbr> tags, like <code>&lt;P&gt;text. . .&lt;/P&gt;</code> will be rendered as <abbr title="HyperText Markup Language">HTML</abbr>; otherwise they will be rendered as <abbr title="HyperText Markup Language">HTML</abbr> entities, as in <code>&amp;lt;P&amp;gt;</code>. </p> <p> The Macro names are case sensitive, so that <code>Macro-A</code> and <code>macro-A</code> are two different names. </p> <p> Macro names are silently deaccented. </p> </div> <div class="secedit editbutton_section editbutton_11"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Syntax] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="syntax" /><input type="hidden" name="codeblockOffset" value="2" /><input type="hidden" name="range" value="6451-6802" /><button type="submit" title="Syntax">Edit</button></div></form></div> <h1 class="sectionedit12" id="expanded_functionality">Expanded Functionality</h1> <div class="level1"> <p> The current version of <strong>textinsert</strong> handles foreign language translation and supports macros which accept parameters. If you don&#039;t need these features or if this version causes any issues you can download the earlier version: <a href="https://github.com/downloads/turnermm/TextInsert/TextInsert-simple.tar.gz" class="urlextern" title="https://github.com/downloads/turnermm/TextInsert/TextInsert-simple.tar.gz">simplified version</a>. </p> </div> <div class="secedit editbutton_section editbutton_12"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Expanded Functionality] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="expanded_functionality" /><input type="hidden" name="codeblockOffset" value="2" /><input type="hidden" name="range" value="6803-7168" /><button type="submit" title="Expanded Functionality">Edit</button></div></form></div> <h2 class="sectionedit13" id="parameter_interpolation">Parameter Interpolation</h2> <div class="level2"> </div> <div class="secedit editbutton_section editbutton_13"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Parameter Interpolation] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="parameter_interpolation" /><input type="hidden" name="codeblockOffset" value="2" /><input type="hidden" name="range" value="7169-7205" /><button type="submit" title="Parameter Interpolation">Edit</button></div></form></div> <h3 class="sectionedit14" id="basic_syntax1">Basic Syntax</h3> <div class="level3"> <p> Macro Definition as defined on page: </p> <pre class="code">#@macro_name~param1,param2,param3. . .param&lt;n&gt;~@#</pre> <p> Replacement String defined in Macro database: </p> <pre class="code">string %1 more string %2 . . .%&lt;n&gt;</pre> <p> %1 will be replaced by param1,%2 by param2, etc. </p> <p> <strong>Example:</strong> <br/> </p> <div class="table sectionedit15"><table class="inline"> <thead> <tr class="row0"> <th class="col0 leftalign"> Macro </th><th class="col1 leftalign"> Macro Replacement String </th> </tr> </thead> <tr class="row1"> <td class="col0 leftalign"> Mountain_Ranges </td><td class="col1 leftalign"> In Europe there are the %1, in North America the %2 and in South America the %3 </td> </tr> </table></div> <div class="secedit editbutton_table editbutton_15"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Table] " /><input type="hidden" name="target" value="table" /><input type="hidden" name="hid" value="table1" /><input type="hidden" name="range" value="7473-7625" /><button type="submit" title="Table">Edit</button></div></form></div><pre class="code">#@Mountain_Ranges~Alps,Rockies,Andes~@# </pre> <p> <strong>Result:</strong> <code>In Europe there are the Alps, in North America the Rockies and in South America the Andes</code> </p> </div> <div class="secedit editbutton_section editbutton_14"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Basic Syntax] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="basic_syntax1" /><input type="hidden" name="codeblockOffset" value="2" /><input type="hidden" name="range" value="7206-7779" /><button type="submit" title="Basic Syntax">Edit</button></div></form></div> <h3 class="sectionedit16" id="dokuwiki_basic_text_formatting_syntax">DokuWiki Basic Text Formatting Syntax</h3> <div class="level3"> <p> Parameters may use the <a href="/wiki:syntax#basic_text_formatting" class="wikilink1" title="wiki:syntax" data-wiki-id="wiki:syntax"> basic text formatting syntax</a>: bold,italic, etc. The one exception is the internal newline. If you need this you must use <code>\n</code>. </p> </div> <div class="secedit editbutton_section editbutton_16"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[DokuWiki Basic Text Formatting Syntax] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="dokuwiki_basic_text_formatting_syntax" /><input type="hidden" name="codeblockOffset" value="2" /><input type="hidden" name="range" value="7780-8022" /><button type="submit" title="DokuWiki Basic Text Formatting Syntax">Edit</button></div></form></div> <h3 class="sectionedit17" id="multi-line_syntax">Multi-line Syntax</h3> <div class="level3"> <pre class="code">#@Macro_name~ parameter one, //comment one parameter two, // comment two parameter three, parameter four . . parameter &lt;n&gt; ~@#</pre> <p> Comments are allowed but not included in the final output. </p> <p> <strong>Example:</strong> <br/> </p> <pre class="code">#@Mountain_Ranges~ Alps, //Switzerland Rockies, // U.S. and Canada Andes ~@#</pre> <p> The final result will be the same as for the single line syntax, as shown above in the example for the <a href="#basic_syntax" title="plugin:textinsert ↵" class="wikilink1">basic_syntax</a>. </p> <p> “Multi-line” also means that parameters and parameter format can continue across line boundaries: </p> <pre class="code">#@Mountain_Ranges~ Alps, //Switzerland Rockies, // U.S. and Canada Andes or Andean Mountains (Spanish: Cordillera de los Andes)\, which are the longest continental mountain range in the world\, forming a continuous highland along the western edge of South America. The Andes also have the 2nd most elevated highest peak of any mountain range\, only behind the Himalayas. ~@#</pre> <p> In order for this to work, the commas must be escaped, since they represent parameter boundaries: <code>\,</code>. </p> </div> <div class="secedit editbutton_section editbutton_17"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Multi-line Syntax] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="multi-line_syntax" /><input type="hidden" name="codeblockOffset" value="2" /><input type="hidden" name="range" value="8023-9095" /><button type="submit" title="Multi-line Syntax">Edit</button></div></form></div> <h2 class="sectionedit18" id="language_translation">Language Translation</h2> <div class="level2"> <p> <code>textinsert</code> makes translation substitutions based on ISO-derived namespaces.<sup><a href="#fn__1" id="fnt__1" class="fn_top">1)</a></sup> Macros found in an ISO-derived namespace will be read within the language context specified by the ISO designation. A namespace is defined by the topmost directory: </p> <ol> <li class="level1"><div class="li"> de:ns1:ns2:page.text <br/> The namespace here is <code>de</code>, i.e. German</div> </li> <li class="level1"><div class="li"> ns1:de:ns:page.txt <br/> The namespace here is <code>ns1</code>, i.e. not an ISO designation </div> </li> </ol> <p> Macros of this type must use the following syntax: </p> <pre class="code">#@LANG_name@#</pre> <p> A default entry for this type of macro must be entered into the textinsert database as <code>LANG_name</code>. The translation strings must be stored in textinsert/lang/&lt;ISO&gt;/lang.php in the $lang array, using &#039;name&#039; for the key. If you have a macro named <code>LANG_greeting</code>, then in lang.php the entry will be: </p> <pre class="code php"><span class="re0">$lang</span><span class="br0">&#91;</span><span class="st_h">'greeting'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="st_h">'language_string_for_greeting'</span><span class="sy0">;</span></pre> <p> If a translation is not found, the default string will be used. </p> <p> Use of <code>lang.php</code> is <strong>deprecated</strong>. See <a href="#improved_language_localization" title="plugin:textinsert ↵" class="wikilink1">improved language localization </a> below for an updated method of storing translations. </p> </div> <div class="secedit editbutton_section editbutton_18"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Language Translation] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="language_translation" /><input type="hidden" name="codeblockOffset" value="5" /><input type="hidden" name="range" value="9096-10308" /><button type="submit" title="Language Translation">Edit</button></div></form></div> <h3 class="sectionedit19" id="example">Example</h3> <div class="level3"> <p> This example is based on the namespace <code>de</code>, which references German pages. </p> <p> You create a page named de:my_file into which you enter the following macro:<code> #@LANG_greeting#@</code>. In the database you enter a default entry under the name <code>LANG_greeting</code>. In textinsert/lang/de/lang.php, you create an entry for $lang[&#039;greeting&#039;]. </p> <p> In each lang.php, you need only a single entry, for instance: </p> <pre class="code">$lang[&#039;greeting&#039;] = &#039;Hello from Germany&#039;;</pre> <p> When you include #@LANG_greeting@# in your document, the country identified by the IS0 namespace will be printed with its <abbr title="HyperText Markup Language">HTML</abbr> formatting. </p> </div> <div class="secedit editbutton_section editbutton_19"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Example] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="example" /><input type="hidden" name="codeblockOffset" value="6" /><input type="hidden" name="range" value="10309-10923" /><button type="submit" title="Example">Edit</button></div></form></div> <h3 class="sectionedit20" id="improved_language_localization">Improved Language Localization</h3> <div class="level3"> <p> Using <code>lang/&lt;iso&gt;/lang.php</code> runs the risk that your macro replacement strings will be lost when the plugin is updated, since <code>lang.php</code> will be overwritten. Beginning with the Oct 10, 2019 update, you can write your macro replacement strings to a separate file named <code>macros.php</code>, also in the <code>&lt;iso&gt;/lang</code> directory: <code>&lt;iso&gt;/lang/macros.php</code>. For backward compatibility, this update still recognizes the use of <code>lang.php</code> to hold your replacement strings. </p> <p> The format of macros.php must follow this example: </p> <pre class="code php"> <span class="kw2">&lt;?php</span> <span class="re0">$lang_</span><span class="sy0">&lt;</span>iso<span class="sy0">&gt;</span><span class="br0">&#91;</span><span class="st_h">'key'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="st_h">'replacement string'</span><span class="sy0">;</span> <span class="re0">$lang_</span><span class="sy0">&lt;</span>iso<span class="sy0">&gt;</span><span class="br0">&#91;</span><span class="st_h">'key'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="st_h">'replacement string'</span><span class="sy0">;</span> <span class="sy0">.</span> <span class="sy0">.</span> </pre> <p> To use the earlier example: </p> <pre class="code php"><span class="kw2">&lt;?php</span> <span class="coMULTI">/* textinsert/lang/de/macros.txt */</span> <span class="re0">$lang_de</span><span class="br0">&#91;</span><span class="st_h">'greeting'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="st_h">'Hello from Germany'</span><span class="sy0">;</span> </pre> </div> <div class="secedit editbutton_section editbutton_20"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Improved Language Localization] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="improved_language_localization" /><input type="hidden" name="codeblockOffset" value="7" /><input type="hidden" name="range" value="10924-11780" /><button type="submit" title="Improved Language Localization">Edit</button></div></form></div> <h3 class="sectionedit21" id="embedding">Embedding</h3> <div class="level3"> <p> Translation macros can be included in standard and <abbr title="HyperText Markup Language">HTML</abbr> macros. They also accept DokuWiki-defined entities, as described above. There is no special <abbr title="HyperText Markup Language">HTML</abbr> translation macro. Any <abbr title="HyperText Markup Language">HTML</abbr> features which appear in a language-based macro will automatically be output as <abbr title="HyperText Markup Language">HTML</abbr> when the macro occurs in a language context. </p> <div class="table sectionedit22"><table class="inline"> <thead> <tr class="row0"> <th class="col0"> # </th><th class="col1"> Macro Name </th><th class="col2"> Definition </th> </tr> </thead> <tr class="row1"> <td class="col0">1</td><td class="col1"> LANG_nation </td><td class="col2"> &lt;h2&gt;I live in Canada&lt;/h2&gt; </td> </tr> <tr class="row2"> <td class="col0">2</td><td class="col1"> nation_<abbr title="HyperText Markup Language">HTML</abbr> </td><td class="col2"> #@LANG_nation@# </td> </tr> <tr class="row3"> <td class="col0">3</td><td class="col1 leftalign"> LANG_city </td><td class="col2"> Toronto </td> </tr> </table></div> <div class="secedit editbutton_table editbutton_22"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Table] " /><input type="hidden" name="target" value="table" /><input type="hidden" name="hid" value="table2" /><input type="hidden" name="range" value="12119-12269" /><button type="submit" title="Table">Edit</button></div></form></div> <p> If the default replacement string contains <abbr title="HyperText Markup Language">HTML</abbr>, then you should use form 2 in the above table when not in a language context; otherwise the <abbr title="HyperText Markup Language">HTML</abbr> will appear in your output as plain text and the <abbr title="HyperText Markup Language">HTML</abbr> will be lost. </p> <p> In a language context, any <abbr title="HyperText Markup Language">HTML</abbr> that you place in your definition will be output as <abbr title="HyperText Markup Language">HTML</abbr>. Assume this is the definition for LANG_nation in the lang/de/lang.php: </p> <pre class="code php"><span class="re0">$lang</span><span class="br0">&#91;</span><span class="st_h">'nation'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="st_h">'Ich lebe in &lt;b&gt;Kanada&lt;/b&gt;'</span><span class="sy0">;</span></pre> <p> In the German namespace, #@LANG_nation@# will be output as <abbr title="HyperText Markup Language">HTML</abbr>: Ich lebe in <strong>Kanada</strong>. </p> <p> It is also possible to include macros in your translations: </p> <pre class="code php"><span class="re0">$lang</span><span class="br0">&#91;</span><span class="st_h">'city'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="st_h">'Berlin '</span><span class="sy0">;</span> <span class="re0">$lang</span><span class="br0">&#91;</span><span class="st_h">'nation'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="st_h">'Ich lebe in &lt;b&gt;#@LANG_city@#&lt;/b&gt;, in Deutschland'</span><span class="sy0">;</span></pre> <p> This results in: Ich lebe in <strong>Berlin</strong>, in Deutschland </p> </div> <div class="secedit editbutton_section editbutton_21"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Embedding] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="embedding" /><input type="hidden" name="codeblockOffset" value="9" /><input type="hidden" name="range" value="11781-13052" /><button type="submit" title="Embedding">Edit</button></div></form></div> <h2 class="sectionedit23" id="configuration_and_settings">Configuration and Settings</h2> <div class="level2"> <p> There are two configuration settings. </p> <div class="table sectionedit24"><table class="inline"> <tr class="row0"> <th class="col0">stdreplace</th><td class="col1">Accept standard macro replacements as used in namespace templates</td><td class="col2">default: on</td> </tr> <tr class="row1"> <th class="col0">farm</th><td class="col1">If this is a farm and you and would like each animal to have its own macro database, please select this option; otherwise all animals will share the same, i.e. the farmer&#039;s, database</td><td class="col2">default: off</td> </tr> </table></div> <div class="secedit editbutton_table editbutton_24"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Table] " /><input type="hidden" name="target" value="table" /><input type="hidden" name="hid" value="table3" /><input type="hidden" name="range" value="13132-13426" /><button type="submit" title="Table">Edit</button></div></form></div> </div> <div class="secedit editbutton_section editbutton_23"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Configuration and Settings] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="configuration_and_settings" /><input type="hidden" name="codeblockOffset" value="11" /><input type="hidden" name="range" value="13053-13428" /><button type="submit" title="Configuration and Settings">Edit</button></div></form></div> <h2 class="sectionedit25" id="development">Development</h2> <div class="level2"> </div> <h4 id="change_log">Change Log</h4> <div class="level4"> <ul class="rss"><li><div class="li"><a href="https://github.com/turnermm/TextInsert/commit/e2a3a5cf5032f0e5f7cefe638e9f08e6fe76c2e3" class="urlextern" title="https://github.com/turnermm/TextInsert/commit/e2a3a5cf5032f0e5f7cefe638e9f08e6fe76c2e3">Adds _NS_ for pseudo namespace macro, cf _ID_</a> (2021-08-13 22:46)</div></li><li><div class="li"><a href="https://github.com/turnermm/TextInsert/commit/90c28ea0a4469582c9f49a454eaedb35f06ac5cd" class="urlextern" title="https://github.com/turnermm/TextInsert/commit/90c28ea0a4469582c9f49a454eaedb35f06ac5cd">Merge pull request #27 from dokuwiki-translate/lang_update_262_161417…</a> (2021-02-24 17:51)</div></li><li><div class="li"><a href="https://github.com/turnermm/TextInsert/commit/c86b4f0e9699a57535af82af5146cdd0f6db7bcf" class="urlextern" title="https://github.com/turnermm/TextInsert/commit/c86b4f0e9699a57535af82af5146cdd0f6db7bcf">translation update</a> (2021-02-24 14:00)</div></li><li><div class="li"><a href="https://github.com/turnermm/TextInsert/commit/d95bde6a0612a2b0fd8713ab803462ab37d29761" class="urlextern" title="https://github.com/turnermm/TextInsert/commit/d95bde6a0612a2b0fd8713ab803462ab37d29761">updates info</a> (2019-10-03 23:39)</div></li><li><div class="li"><a href="https://github.com/turnermm/TextInsert/commit/f6e0504a46c6ca7cc039c0000ed51a9fe8a858df" class="urlextern" title="https://github.com/turnermm/TextInsert/commit/f6e0504a46c6ca7cc039c0000ed51a9fe8a858df">Merge pull request #22 from turnermm/multi-lang</a> (2019-10-03 23:21)</div></li><li><div class="li"><a href="https://github.com/turnermm/TextInsert/commit/34a7599d7d6b70d9b78def732f6c1a4f01e76e59" class="urlextern" title="https://github.com/turnermm/TextInsert/commit/34a7599d7d6b70d9b78def732f6c1a4f01e76e59">added localization feature: lang/&lt;iso&gt;/macros.php hold translations. …</a> (2019-10-03 03:31)</div></li><li><div class="li"><a href="https://github.com/turnermm/TextInsert/commit/59612bfd0332e2f9e5dbc62759d518caddd571a9" class="urlextern" title="https://github.com/turnermm/TextInsert/commit/59612bfd0332e2f9e5dbc62759d518caddd571a9">updates info.txt</a> (2019-09-26 17:49)</div></li><li><div class="li"><a href="https://github.com/turnermm/TextInsert/commit/efcba6dcdb2b2746f380c96c1b0fbeb9726bd568" class="urlextern" title="https://github.com/turnermm/TextInsert/commit/efcba6dcdb2b2746f380c96c1b0fbeb9726bd568">Merge pull request #21 from turnermm/multi-line</a> (2019-09-26 16:23)</div></li><li><div class="li"><a href="https://github.com/turnermm/TextInsert/commit/d9a7eba853705a63fe22617bcfdc806ac2af4505" class="urlextern" title="https://github.com/turnermm/TextInsert/commit/d9a7eba853705a63fe22617bcfdc806ac2af4505">Enable marking up of DokuWiki basic syntax</a> (2019-09-26 03:00)</div></li><li><div class="li"><a href="https://github.com/turnermm/TextInsert/commit/28e7d78560f8d67f3fbce4abff1f7b417d8a8b5e" class="urlextern" title="https://github.com/turnermm/TextInsert/commit/28e7d78560f8d67f3fbce4abff1f7b417d8a8b5e">trim macro subsitutions before insertion</a> (2019-09-24 23:48)</div></li></ul> </div> <div class="secedit editbutton_section editbutton_25"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Development] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="development" /><input type="hidden" name="codeblockOffset" value="11" /><input type="hidden" name="range" value="13429-13555" /><button type="submit" title="Development">Edit</button></div></form></div> <h2 class="sectionedit26" id="discussion">Discussion</h2> <div class="level2"> <p> All earlier questions have been moved to <a href="/plugin:textinsert:discussion" class="wikilink1" title="plugin:textinsert:discussion" data-wiki-id="plugin:textinsert:discussion">discussion</a>. Additional questions should use <a href="https://github.com/turnermm/TextInsert/issues/" class="urlextern" title="https://github.com/turnermm/TextInsert/issues/">github issues</a>. Thanks. </p> </div> <div class="secedit editbutton_section editbutton_26"><form class="button btn_secedit" method="post" action="/plugin:textinsert"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1661814973" /><input type="hidden" name="summary" value="[Discussion] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="discussion" /><input type="hidden" name="codeblockOffset" value="11" /><input type="hidden" name="range" value="13556-" /><button type="submit" title="Discussion">Edit</button></div></form></div><div class="footnotes"> <div class="fn"><sup><a href="#fnt__1" id="fn__1" class="fn_bot">1)</a></sup> <div class="content">This is consistent with the scheme used by the <a href="/plugin:translation" class="wikilink1" title="plugin:translation" data-wiki-id="plugin:translation">translation</a> plugin.</div></div> </div> <!-- wikipage stop --> </div> <div class="docInfo"><bdi>plugin/textinsert.txt</bdi> · Last modified: <time datetime="2022-08-30T01:16:13+0200">2022-08-30 01:16</time> by <bdi>82.64.33.11</bdi></div> <hr class="a11y" /> </div></main><!-- /content --> <!-- PAGE ACTIONS --> <nav id="dokuwiki__pagetools" aria-labelledby="dokuwiki__pagetools__heading"> <h3 class="a11y" id="dokuwiki__pagetools__heading">Page Tools</h3> <div class="tools"> <ul> <li class="edit"><a href="/plugin:textinsert?do=edit" title="Edit this page [e]" rel="nofollow" accesskey="e"><span>Edit this page</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg></a></li><li class="revs"><a href="/plugin:textinsert?do=revisions" title="Old revisions [o]" rel="nofollow" accesskey="o"><span>Old revisions</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M11 7v5.11l4.71 2.79.79-1.28-4-2.37V7m0-5C8.97 2 5.91 3.92 4.27 6.77L2 4.5V11h6.5L5.75 8.25C6.96 5.73 9.5 4 12.5 4a7.5 7.5 0 0 1 7.5 7.5 7.5 7.5 0 0 1-7.5 7.5c-3.27 0-6.03-2.09-7.06-5h-2.1c1.1 4.03 4.77 7 9.16 7 5.24 0 9.5-4.25 9.5-9.5A9.5 9.5 0 0 0 12.5 2z"/></svg></a></li><li class="backlink"><a href="/plugin:textinsert?do=backlink" title="Backlinks" rel="nofollow"><span>Backlinks</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10.59 13.41c.41.39.41 1.03 0 1.42-.39.39-1.03.39-1.42 0a5.003 5.003 0 0 1 0-7.07l3.54-3.54a5.003 5.003 0 0 1 7.07 0 5.003 5.003 0 0 1 0 7.07l-1.49 1.49c.01-.82-.12-1.64-.4-2.42l.47-.48a2.982 2.982 0 0 0 0-4.24 2.982 2.982 0 0 0-4.24 0l-3.53 3.53a2.982 2.982 0 0 0 0 4.24m2.82-4.24c.39-.39 1.03-.39 1.42 0a5.003 5.003 0 0 1 0 7.07l-3.54 3.54a5.003 5.003 0 0 1-7.07 0 5.003 5.003 0 0 1 0-7.07l1.49-1.49c-.01.82.12 1.64.4 2.43l-.47.47a2.982 2.982 0 0 0 0 4.24 2.982 2.982 0 0 0 4.24 0l3.53-3.53a2.982 2.982 0 0 0 0-4.24.973.973 0 0 1 0-1.42z"/></svg></a></li><li class="top"><a href="#dokuwiki__top" title="Back to top [t]" rel="nofollow" accesskey="t"><span>Back to top</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"/></svg></a></li> </ul> </div> </nav> </div><!-- /wrapper --> <!-- ********** FOOTER ********** --> <footer id="dokuwiki__footer"><div class="pad"> <div class="license">Except where otherwise noted, content on this wiki is licensed under the following license: <bdi><a href="https://creativecommons.org/licenses/by-sa/4.0/deed.en" rel="license" class="urlextern">CC Attribution-Share Alike 4.0 International</a></bdi></div> <div class="buttons"> <a href="https://creativecommons.org/licenses/by-sa/4.0/deed.en" rel="license"><img src="/lib/images/license/button/cc-by-sa.png" alt="CC Attribution-Share Alike 4.0 International" /></a> <a href="https://www.dokuwiki.org/donate" title="Donate" ><img src="/lib/tpl/dokuwiki/images/button-donate.gif" width="80" height="15" alt="Donate" /></a> <a href="https://php.net" title="Powered by PHP" ><img src="/lib/tpl/dokuwiki/images/button-php.gif" width="80" height="15" alt="Powered by PHP" /></a> <a href="//validator.w3.org/check/referer" title="Valid HTML5" ><img src="/lib/tpl/dokuwiki/images/button-html5.png" width="80" height="15" alt="Valid HTML5" /></a> <a href="//jigsaw.w3.org/css-validator/check/referer?profile=css3" title="Valid CSS" ><img src="/lib/tpl/dokuwiki/images/button-css.png" width="80" height="15" alt="Valid CSS" /></a> <a href="https://dokuwiki.org/" title="Driven by DokuWiki" ><img src="/lib/tpl/dokuwiki/images/button-dw.png" width="80" height="15" alt="Driven by DokuWiki" /></a> </div> <div style="margin-top: 2em; font-size:90%" class="dokuwiki"><div style="float:right"><a href="http://www.splitbrain.org/personal#imprint" style="float:right; text-decoration: none; color:#333">Imprint</a></div></div><!-- Include for DokuWiki site wide top bar --> <style type="text/css"> @media screen { body { padding-top: 30px; } #global__header { position: absolute; top: 0; left: 0; text-align: left; vertical-align: middle; line-height: 1.5; background-color: #333; box-shadow: 0 0 8px rgba(0,0,0,0.5); width: 100%; margin: 0; padding: 5px 20px; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; white-space: nowrap; overflow: hidden; } #global__header h2 { position: absolute; left: -99999em; top: 0; overflow: hidden; display: inline; } #global__header ul, #global__header li { margin: 0; padding: 0; list-style: none; display: inline; line-height: 1.5; } #global__header a { color: #bbb; text-decoration: none; margin-right: 20px; font-size: 14px; font-weight: normal; } #global__header a:hover, #global__header a:active, #global__header a:focus { color: #fff; text-decoration: underline; } #global__header form { float: right; margin: 0 0 0 20px; } #global__header input { background-color: #333; background-image: none; border: 1px solid #bbb; color: #fff; box-shadow: none; border-radius: 2px; margin: 0; line-height: normal; padding: 1px 0 1px 0; height: auto; } #global__header input.button { border: none; color: #bbb; } #global__header input.button:hover, #global__header input.button:active, #global__header input.button:focus { color: #fff; text-decoration: underline; } } /* /@media */ @media only screen and (min-width: 601px) { /* changes specific for www.dokuwiki.org */ #dokuwiki__header { padding-top: 3em; } #dokuwiki__usertools { top: 3em; } /* changes specific for bugs.dokuwiki.org */ div#container div#showtask { top: 40px; } } /* /@media */ @media only screen and (max-width: 600px) { body { padding-top: 0; } #global__header { position: static; white-space: normal; overflow: auto; } #global__header form { float: none; display: block; margin: 0 0 .4em; } } /* /@media */ @media print { #global__header { display: none; } } /* /@media */ </style> <div id="global__header"> <h2>Global DokuWiki Links</h2> <form method="get" action="https://search.dokuwiki.org/" target="_top"> <input type="text" name="q" title="Search all DokuWiki sites at once" class="input" /> <input type="submit" title="Search all DokuWiki sites at once" value="Search" class="button" /> </form> <ul> <li><a href="https://download.dokuwiki.org" title="Download the latest release" target="_top">Download</a></li> <li><a href="https://www.dokuwiki.org" title="Read the DokuWiki documentation" target="_top">Wiki</a></li> <li><a href="https://forum.dokuwiki.org" title="Ask questions in the DokuWiki forum" target="_top">Forum</a></li> <li><a href="https://irc.dokuwiki.org" title="Check IRC chat logs or join the chat" target="_top">IRC</a></li> <li><a href="https://github.com/splitbrain/dokuwiki/issues" title="Report and track bugs" target="_top">Bugs</a></li> <li><a href="https://translate.dokuwiki.org/" title="Help translating the DokuWiki interface" target="_top">Translate</a></li> <li><a href="https://github.com/splitbrain/dokuwiki" title="Access the most recent git commits" target="_top">Git</a></li> <li><a href="https://xref.dokuwiki.org/reference/dokuwiki/" title="Cross-Reference of the DokuWiki source code" target="_top">XRef</a></li> <li><a href="https://codesearch.dokuwiki.org/" title="Search through the sources of DokuWiki, plugins and templates" target="_top">Code Search</a></li> </ul> </div> <!-- end of DokuWiki top bar include --> </div></footer><!-- /footer --> </div></div><!-- /site --> <div class="no"><img src="/lib/exe/taskrunner.php?id=plugin%3Atextinsert&amp;1732798476" width="2" height="1" alt="" /></div> <div id="screen__mode" class="no"></div></body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10