language.html (2794B)
1 <!DOCTYPE html> 2 <html> 3 <!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> 4 <head> 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 6 <!-- Released 2023 under AGPL3 --> 7 <title>language (vise)</title> 8 9 <meta name="description" content="language (vise)"> 10 <meta name="keywords" content="language (vise)"> 11 <meta name="resource-type" content="document"> 12 <meta name="distribution" content="global"> 13 <meta name="Generator" content="makeinfo"> 14 <meta name="viewport" content="width=device-width,initial-scale=1"> 15 16 <link href="index.html" rel="start" title="Top"> 17 <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> 18 <link href="index.html" rel="up" title="Top"> 19 <link href="exceptions.html" rel="next" title="exceptions"> 20 <link href="render.html" rel="prev" title="render"> 21 <style type="text/css"> 22 <!-- 23 a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em} 24 span:hover a.copiable-link {visibility: visible} 25 --> 26 </style> 27 28 29 </head> 30 31 <body lang="en"> 32 <div class="chapter-level-extent" id="language"> 33 <div class="nav-panel"> 34 <p> 35 Next: <a href="exceptions.html" accesskey="n" rel="next">Exceptional states</a>, Previous: <a href="render.html" accesskey="p" rel="prev">Rendering</a>, Up: <a href="index.html" accesskey="u" rel="up">Introduction</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p> 36 </div> 37 <hr> 38 <h2 class="chapter" id="Handling-languages"><span>9 Handling languages<a class="copiable-link" href="#Handling-languages"> ¶</a></span></h2> 39 40 41 <p>Templates, external code symbols and menu labels can be resolved differently depending on language. 42 </p> 43 <p>This is enabled by the <a class="ref" href="dev.html#execution_005fcontext">Execution context</a> of the engine. Through the context, the current language, if set, is always available to client code. 44 </p> 45 <p>Language specification is encapsulated by the <code class="code">lang</code> module, using the ISO639 language identifier standard. 46 </p> 47 48 <ul class="mini-toc"> 49 <li><a href="#Defining-language" accesskey="1">Defining language</a></li> 50 </ul> 51 <div class="section-level-extent" id="Defining-language"> 52 <h3 class="section"><span>9.1 Defining language<a class="copiable-link" href="#Defining-language"> ¶</a></span></h3> 53 54 <p>The default language can be set in <code class="code">engine.Config.Language</code>. 55 </p> 56 <p>It may also be set as a side-effect of bytecode execution. This is done by executing <code class="code">LOAD</code> with a symbol returning an <code class="code">ISO639</code> language code, while setting the <code class="code">LANG</code> signal flag (see <a class="ref" href="signals.html#builtin_005fflags">Built-in signal flags</a>. 57 </p></div> 58 </div> 59 60 61 62 </body> 63 </html>