On Mon, 22 Jun 2015, Allin Cottrell wrote:
On Mon, 22 Jun 2015, Ignacio Diaz-Emparanza wrote:
> This works in Linux, producing the two first letters of the LANG
> environment variable:
>
> string lang=substr(getenv("LANG"),1,2)
>
> But I don't know how to do it in Windows (I see Windows 7 has not this
> variable in the environment)
There's now a $lang accessor in CVS and snapshots. I've done a little testing
on Windows but not much. The returned string should be of the form "es_ES",
"zh_TW", "en_US" and so on (ISO 639-1 language + '_' + ISO
3166-1 two-letter
country).
Hmm.
<bash>
LANGUAGE=it_IT gretl &
</bash>
<console>
Terminale di gretl: scrivere 'help' per la lista dei comandi
? a = $lang
Generata la stringa a
? print a
en_GB
</console>
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------