El 22/06/15 a las 11:51, Ignacio Diaz-Emparanza escribió:
El 22/06/15 a las 11:24, Allin Cottrell escribió:
> [...]
> True, there's not much stuff relevant to gretl in the Windows
> environment. Variables such as 'gnuplot' and 'tramo' are available as
> gretl strings, either proper string variables (e.g. $gnuplot) or as
> string-substitution targets (e.g. @gnuplot).
>
> It shouldn't be too difficult to provide a gretl $lang accessor. I'll
> take a look at that and report back.
>
> Allin
Although we may have this $lang function, a problem remains: we cannot
put localized strings in the definition of the parameters (those
strings that appear in the GUI dialog box of the fucntions). But ... I
think I may have a workaround for this, let me prepare an example
(which BTW may not need the $lang function).
Well ... It was no so difficult. The example is attached. It is again
Holt-Winters which is a rather basic package with an only function. The
idea is to exploit the possibility for packages of having several public
functions. I have transformed the package in such a way that now we have
two wrapper functions "HoltWinters_english" and "Holtwinters_spanish".
Each of them have all the strings in their proper language. The strings
are stored in a bundle an at the final, each function calls a common
function "HoltWinters_engine" which reads the strings, series, scalars,
etc passed by the first function.
In this way, for example if Yi-nung wants to make a translation to
Chinese he only has to add a new public function "Holtwinters_Chinese"
in which he can translate the corresponding strings.
(Note: The "lang" string is not used here but might be needed in another
languages)
--
Ignacio Díaz-Emparanza
Departamento de Economía Aplicada III (Econometría y Estadística)
Universidad del País Vasco - Euskalherriko Unibertsitatea, UPV/EHU
Tfno: (+34) 94 601 3732
http://www.ehu.eus/ea3