$LangUst: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
 
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<p>The $LANGUST function translates back to its original form a string previously translated by $LANGSRT processing, which is useful for applications that maintain sorted arrays of data and need to display the values.</p>
<p>
<b>Syntax</b>
The <var>$LangUst</var> function translates back to its original form a string previously translated by <var>[[$LangSrt]]</var> processing, which is useful for applications that maintain sorted arrays of data and need to display the values.</p>
<p class="code">$LANGUST('<var class="term">string</var>'[,<var class="term">language</var>])
 
==Syntax==
<p class="syntax">$LangUst('<span class="term">string</span>'[,<span class="term">language</span>])
</p>
</p>
<p>where:</p>
<p>
<p><var>The string</var> argument is a literal enclosed in quotation marks or a %variable containing the data in collating sequence to be translated back to its original form.</p>
Where:</p>
<p><var>The optional language</var> argument is the name of one of the defined languages, specifying which collating sequence to use. The language argument is handled as follows:</p>
<ul>
<ul>
<li>You can enter the name of a valid language enclosed in quotation marks or a %variable containing a valid language. If the value you enter is not supported, the request is canceled with an error message. See The LANGUSER parameter in the Rocket <var class="product">Model&nbsp;204</var> Parameter and Command Reference Manual for the valid values.</li>
<li>The <var class="term">string</var> argument is a literal enclosed in quotation marks, or it is a %variable containing the data in a collating sequence to be translated back to its original form.</li>
</li>
 
<li>An asterisk enclosed in quotation marks ('*') instructs <var class="product">Model&nbsp;204</var> to use the value of the LANGUSER parameter.</li>
<li>The optional <var class="term">language</var> argument is the name of one of the defined languages, specifying which collating sequence to use. The <var class="term">language</var> argument is handled as follows:
</li>
<ul>
<li>When you omit the <var class="term">language</var> argument, <var class="product">Model&nbsp;204</var> performs the validation in U.S. English, even if the value of the LANGUSER parameter is not US, and lowercase characters are not recognized.</li>
<li>You can enter the name of a valid language enclosed in quotation marks or a %variable containing a valid language. If the value you enter is not supported, the request is canceled with an error message. See the <var>[[LANGUSER parameter|LANGUSER]]</var> parameter for the valid values.</li>
</li>
 
<li>An asterisk enclosed in quotation marks (<tt>'*'</tt>) instructs <var class="product">Model&nbsp;204</var> to use the value of the <var>LANGUSER</var> parameter.</li>
 
<li>If you omit the <var class="term">language</var> argument, <var class="product">Model&nbsp;204</var> performs the validation in U.S. English (even if the value of the <var>LANGUSER</var> parameter is not <code>US</code>) and lowercase characters are not recognized.</li>
</ul></li>
</ul>
</ul>
<p class="note"><b>Note:</b> If encoding information was truncated, either during $LANGSRT processing or during subsequent expression evaluation, then the $LANGUST function does not return the exact string that was originally translated by the $LANGSRT processing. Truncated variant characters are returned as the associated base character, for example, is returned as A.</p>
<p class="note"><b>Note:</b> If encoding information was truncated, either during <var>$LangSrt</var> processing or during subsequent expression evaluation, then the <var>$LangUst</var> function does not return the exact string that was originally translated by the <var>$LangSrt</var> processing. Truncated variant characters are returned as the associated base character; for example, &Agrave; is returned as A.</p>
<b>Example</b>
 
<p>If your site maintains two types of terminals and keyboards that store and display the same character set, individual characters might be assigned differing hexadecimal codes on different keyboards. You can translate the character equivalents back and forth as follows:</p>
==Example==
<p class="code">$LANGUST($LANGSRT(string,source-language),  
<p>
          target-language)
If your site maintains two types of terminals and keyboards that store and display the same character set, individual characters might be assigned differing hexadecimal codes on different keyboards. You can translate the character equivalents back and forth as follows:</p>
<p class="code">$LANGUST($LANGSRT(<i>string</i>, <i>source-language</i>), <i>target-language</i>)
</p>
</p>
<p>A character without an equivalent converts to its base character. A special character without an equivalent converts to a space.</p>
<p>
A character without an equivalent converts to its base character. A special character without an equivalent converts to a space.</p>
 
[[Category:SOUL $functions]]
[[Category:SOUL $functions]]

Latest revision as of 23:13, 8 March 2016

The $LangUst function translates back to its original form a string previously translated by $LangSrt processing, which is useful for applications that maintain sorted arrays of data and need to display the values.

Syntax

$LangUst('string'[,language])

Where:

  • The string argument is a literal enclosed in quotation marks, or it is a %variable containing the data in a collating sequence to be translated back to its original form.
  • The optional language argument is the name of one of the defined languages, specifying which collating sequence to use. The language argument is handled as follows:
    • You can enter the name of a valid language enclosed in quotation marks or a %variable containing a valid language. If the value you enter is not supported, the request is canceled with an error message. See the LANGUSER parameter for the valid values.
    • An asterisk enclosed in quotation marks ('*') instructs Model 204 to use the value of the LANGUSER parameter.
    • If you omit the language argument, Model 204 performs the validation in U.S. English (even if the value of the LANGUSER parameter is not US) and lowercase characters are not recognized.

Note: If encoding information was truncated, either during $LangSrt processing or during subsequent expression evaluation, then the $LangUst function does not return the exact string that was originally translated by the $LangSrt processing. Truncated variant characters are returned as the associated base character; for example, À is returned as A.

Example

If your site maintains two types of terminals and keyboards that store and display the same character set, individual characters might be assigned differing hexadecimal codes on different keyboards. You can translate the character equivalents back and forth as follows:

$LANGUST($LANGSRT(string, source-language), target-language)

A character without an equivalent converts to its base character. A special character without an equivalent converts to a space.