/usr/share/doc/racket/string-constants/index.html is in racket-doc 6.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>String Constants: GUI Internationalization</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">►</a></td><td></td><td><a href="" class="tocviewselflink" data-pltdoc="x">String Constants:<span class="mywbr"> </span> GUI Internationalization</a></td></tr></table></div><div class="tocviewsublistonly" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="#%28part._.Using_.String_.Constants%29" class="tocviewlink" data-pltdoc="x">Using String Constants</a></td></tr><tr><td align="right">2 </td><td><a href="#%28part._.Adding_.String_.Constants%29" class="tocviewlink" data-pltdoc="x">Adding String Constants</a></td></tr><tr><td align="right">3 </td><td><a href="#%28part._.Language_.Environment_.Variables%29" class="tocviewlink" data-pltdoc="x">Language Environment Variables</a></td></tr></table></div></div></div><div class="tocsub"><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber"></span><a href="#%28part._top%29" class="tocsubseclink" data-pltdoc="x">String Constants:<span class="mywbr"> </span> GUI Internationalization</a></td></tr><tr><td><span class="tocsublinknumber">1<tt> </tt></span><a href="#%28part._.Using_.String_.Constants%29" class="tocsubseclink" data-pltdoc="x">Using String Constants</a></td></tr><tr><td><a href="#%28form._%28%28lib._string-constants%2Fstring-constant..rkt%29._string-constant%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">string-<wbr></wbr>constant</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._string-constants%2Fstring-constant..rkt%29._string-constants%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">string-<wbr></wbr>constants</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._string-constants%2Fstring-constant..rkt%29._dynamic-string-constant%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">dynamic-<wbr></wbr>string-<wbr></wbr>constant</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._string-constants%2Fstring-constant..rkt%29._dynamic-string-constants%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">dynamic-<wbr></wbr>string-<wbr></wbr>constants</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._string-constants%2Fstring-constant..rkt%29._string-constant~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">string-<wbr></wbr>constant?</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._string-constants%2Fstring-constant..rkt%29._this-language%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">this-<wbr></wbr>language</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._string-constants%2Fstring-constant..rkt%29._all-languages%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">all-<wbr></wbr>languages</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._string-constants%2Fstring-constant..rkt%29._set-language-pref%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>language-<wbr></wbr>pref</span></span></a></td></tr><tr><td><span class="tocsublinknumber">2<tt> </tt></span><a href="#%28part._.Adding_.String_.Constants%29" class="tocsubseclink" data-pltdoc="x">Adding String Constants</a></td></tr><tr><td><span class="tocsublinknumber">3<tt> </tt></span><a href="#%28part._.Language_.Environment_.Variables%29" class="tocsubseclink" data-pltdoc="x">Language Environment Variables</a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="versionbox"><span class="version">6.3</span></div><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.3", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.3");">top</a></span><span class="navright"> <span class="nonavigation">← prev</span> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.3");">up</a> <span class="nonavigation">next →</span></span> </div><h2 x-source-module="(lib "string-constants/string-constants.scrbl")" x-source-pkg="string-constants-doc" x-part-tag=""top""><a name="(part._top)"></a><a name="(part._.String_.Constants__.G.U.I_.Internationalization)"></a>String Constants: GUI Internationalization</h2><p>This library provides the facility for multiple languages in
DrRacket’s GUI.</p><h3 x-source-module="(lib "string-constants/string-constants.scrbl")" x-source-pkg="string-constants-doc" x-part-tag=""Using_String_Constants"">1<tt> </tt><a name="(part._.Using_.String_.Constants)"></a><a name="(mod-path._string-constants)"></a>Using String Constants</h3><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left" colspan="2"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._string-constants%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">string-constants</span></a><span class="RktPn">)</span></td></tr><tr><td align="left"> </td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">string-constants-lib</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._string-constants/string-constant..rkt)._string-constant))"></a><span title="Provided from: string-constants/string-constant, string-constants | Package: string-constants-lib"><span class="RktSym"><a href="#%28form._%28%28lib._string-constants%2Fstring-constant..rkt%29._string-constant%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">string-constant</a></span></span><span class="hspace"> </span><span class="RktVar">name</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">This form returns the string constant named <span class="RktVar">name</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._string-constants/string-constant..rkt)._string-constants))"></a><span title="Provided from: string-constants/string-constant, string-constants | Package: string-constants-lib"><span class="RktSym"><a href="#%28form._%28%28lib._string-constants%2Fstring-constant..rkt%29._string-constants%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">string-constants</a></span></span><span class="hspace"> </span><span class="RktVar">name</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">This form returns a list of string constants, one for each language
that DrRacket’s GUI supports.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._string-constants/string-constant..rkt)._dynamic-string-constant))"></a><span title="Provided from: string-constants/string-constant, string-constants | Package: string-constants-lib"><span class="RktSym"><a href="#%28def._%28%28lib._string-constants%2Fstring-constant..rkt%29._dynamic-string-constant%29%29" class="RktValDef RktValLink" data-pltdoc="x">dynamic-string-constant</a></span></span><span class="hspace"> </span><span class="RktVar">name</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._string-constants%2Fstring-constant..rkt%29._string-constant~3f%29%29" class="RktValLink" data-pltdoc="x">string-constant?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">This, like <span class="RktSym"><a href="#%28form._%28%28lib._string-constants%2Fstring-constant..rkt%29._string-constant%29%29" class="RktStxLink" data-pltdoc="x">string-constant</a></span>, returns the string constant
named <span class="RktVar">name</span>, but without any compile-time checking on the
argument.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._string-constants/string-constant..rkt)._dynamic-string-constants))"></a><span title="Provided from: string-constants/string-constant, string-constants | Package: string-constants-lib"><span class="RktSym"><a href="#%28def._%28%28lib._string-constants%2Fstring-constant..rkt%29._dynamic-string-constants%29%29" class="RktValDef RktValLink" data-pltdoc="x">dynamic-string-constants</a></span></span><span class="hspace"> </span><span class="RktVar">name</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._string-constants%2Fstring-constant..rkt%29._string-constant~3f%29%29" class="RktValLink" data-pltdoc="x">string-constant?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">This, like <span class="RktSym"><a href="#%28form._%28%28lib._string-constants%2Fstring-constant..rkt%29._string-constants%29%29" class="RktStxLink" data-pltdoc="x">string-constants</a></span>, returns the string constants
matching <span class="RktVar">name</span>, but without any compile-time checking on the
argument.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._string-constants/string-constant..rkt)._string-constant~3f))"></a><span title="Provided from: string-constants/string-constant, string-constants | Package: string-constants-lib"><span class="RktSym"><a href="#%28def._%28%28lib._string-constants%2Fstring-constant..rkt%29._string-constant~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">string-constant?</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> is a symbol naming a known string constant.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._string-constants/string-constant..rkt)._this-language))"></a><span title="Provided from: string-constants/string-constant, string-constants | Package: string-constants-lib"><span class="RktSym"><a href="#%28form._%28%28lib._string-constants%2Fstring-constant..rkt%29._this-language%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">this-language</a></span></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">This form returns the name of the current language as a symbol.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._string-constants/string-constant..rkt)._all-languages))"></a><span title="Provided from: string-constants/string-constant, string-constants | Package: string-constants-lib"><span class="RktSym"><a href="#%28form._%28%28lib._string-constants%2Fstring-constant..rkt%29._all-languages%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">all-languages</a></span></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">This form returns a list of symbols (in the same order as those
returned from <span class="RktSym"><a href="#%28form._%28%28lib._string-constants%2Fstring-constant..rkt%29._string-constants%29%29" class="RktStxLink" data-pltdoc="x">string-constants</a></span>) naming each language.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._string-constants/string-constant..rkt)._set-language-pref))"></a><span title="Provided from: string-constants/string-constant, string-constants | Package: string-constants-lib"><span class="RktSym"><a href="#%28def._%28%28lib._string-constants%2Fstring-constant..rkt%29._set-language-pref%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-language-pref</a></span></span><span class="hspace"> </span><span class="RktVar">lang</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">lang</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Sets the language for the next run of DrRacket to <span class="RktVar">lang</span>, which
must be a symbol returned from <span class="RktSym"><a href="#%28form._%28%28lib._string-constants%2Fstring-constant..rkt%29._all-languages%29%29" class="RktStxLink" data-pltdoc="x">all-languages</a></span>. Does not affect the
running DrRacket.</div></p><h3 x-source-module="(lib "string-constants/string-constants.scrbl")" x-source-pkg="string-constants-doc" x-part-tag=""Adding_String_Constants"">2<tt> </tt><a name="(part._.Adding_.String_.Constants)"></a>Adding String Constants</h3><p>To add string constants to DrRacket, see the file
<span class="stt">"private/english-string-constants.rkt"</span>
and the other string constants files in the <span class="stt">"private"</span>
directory.</p><p>Each file has the same format. They are each modules in the
<span class="RktSym">string-constants/private/string-constant-lang</span> language. The
body of each module is a finite mapping table that gives the mapping
from the symbolic name of a string constant to its translation in the
appropriate language. Multiple string constants that appear together are
implicitly concatenated.</p><p>The <span class="stt">"english-string-constants"</span> is considered the master file;
string constants will be set there and translated into each of the
other language files. In addition, the
<span class="stt">"english-string-constants.rkt"</span> file should contain hints about
the context of the strings whose symbol name might not be clear.</p><h3 x-source-module="(lib "string-constants/string-constants.scrbl")" x-source-pkg="string-constants-doc" x-part-tag=""Language_Environment_Variables"">3<tt> </tt><a name="(part._.Language_.Environment_.Variables)"></a>Language Environment Variables</h3><ul><li><p><a name="(idx._(gentag._0._(lib._string-constants/string-constants..scrbl)))"></a><span class="stt">PLTSTRINGCONSTANTS</span></p></li><li><p><a name="(idx._(gentag._1._(lib._string-constants/string-constants..scrbl)))"></a><span class="stt">STRINGCONSTANTS</span></p></li></ul><p>If either of these environment variables are set, DrRacket
shows you, during startup, which string constants are not
yet defined for each language.</p><p>You can also specify which languages you are interested
in. If either environment variable is bound to a symbol (as
interpreted by <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=Reading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._read%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">read</a></span>) you see only the corresponding
language’s messages. If either one is bound to a list of
symbols (again, as interpreted by <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=Reading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._read%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">read</a></span>) you see the
messages for all the languages in the list. If either is
bound to anything else, you see all of the languages.</p><p>The <span class="stt">PLTSTRINGCONSTANTS</span> environment variable takes precedence
of the <span class="stt">STRINGCONSTANTS</span> environment variable.</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.3", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.3");">top</a></span><span class="navright"> <span class="nonavigation">← prev</span> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.3");">up</a> <span class="nonavigation">next →</span></span> </div></div></div><div id="contextindicator"> </div></body></html>
|