<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hello Federico,<br>
<br>
<br>
Le 04/03/2019 à 05:58, Federico Miyara a écrit :<br>
</div>
<blockquote cite="mid:5C7CB06F.8060300@fceia.unr.edu.ar" type="cite">
<br>
Dear all,
<br>
<br>
I'm trying to understand the way the localizing function gettext
works. For instance,
<br>
<br>
setlanguage('es') // Set Spanish as session language
<br>
gettext("%s: Wrong number of input arguments.\n")
<br>
<br>
produces the expected result:
<br>
<br>
%s: Número incorrecto de argumentos de entrada.\n
<br>
<br>
But
<br>
<br>
gettext("Wrong number of input arguments.")
<br>
<br>
returns the original English version
<br>
<br>
Wrong number of input arguments.
<br>
<br>
Are the elements %s and \n part of the indexed string?
<br>
</blockquote>
<br>
Yes. The string provided to gettext() is an identifier. So changing
any single character of it then refers to another message.<br>
<br>
You might have already had a look at the gettext page:
<a class="moz-txt-link-freetext" href="https://help.scilab.org/docs/6.0.2/en_US/gettext.html">https://help.scilab.org/docs/6.0.2/en_US/gettext.html</a><br>
<br>
<blockquote cite="mid:5C7CB06F.8060300@fceia.unr.edu.ar" type="cite">
<br>
How can I get a list of indexed strings?<br>
</blockquote>
<br>
The most frequent ones are newly listed in <br>
<tt>--> help error_table</tt><br>
<br>
<a class="moz-txt-link-freetext" href="https://help.scilab.org/docs/6.0.2/en_US/error_table.html">https://help.scilab.org/docs/6.0.2/en_US/error_table.html</a><br>
For an exhaustive list, please<br>
<ul>
<li>Download and unzip the source code :
<a class="moz-txt-link-freetext" href="https://www.scilab.org/previous-scilab-versions">https://www.scilab.org/previous-scilab-versions</a><br>
</li>
<li>In your OS file browser, from the root directory of the source
tree, select all *.pot files (roughtly 1 hundred of files)</li>
<li>Edit *.pot files. They are unformatted text files. Each one
gathers all gettext messages identifiers for a native Scilab
module.</li>
</ul>
<p><br>
</p>
<p>Hope This Helps<br>
</p>
<p>Samuel</p>
<p><br>
</p>
</body>
</html>