Re: [code] [textadept] Detecting the locale in Windows

From: Rena <hyperhacker.att.gmail.com>
Date: Sat, 5 Sep 2015 19:07:20 -0400

On Sep 5, 2015 6:41 AM, "Giovanni Salmeri" <g.salmeri.att.mondodomani.org>
wrote:
>
> > > f = package.loadlib("kernel32.dll", "GetUserDefaultUILanguage")
>
> > Unless TextAdept does something special, you won't be able to call
> > Windows API functions using package.loadlib. You'd need an FFI
> > library such as Alien (or TA would have to expose a wrapper in the C
> > API).
>
> Thank you! Out of curiosity I will try with Alien, but I think it would
> be overkill for my aims. If the above code worked with Win >= XP (I have
> still to check XP), for me it would be more than enough.
>
> --
> Giovanni Salmeri
> http://mondodomani.org/pers/salmeri/
> --
> You are subscribed to code.att.foicica.com.
> To change subscription settings, send an e-mail to code+help.att.foicica.com.
> To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
>

IIRC there's also a Windows API binding for Lua, but I can't remember its
name.

As a workaround, you could manually set the LANG variable in Windows'
settings. I think it's under control panel -> system -> advanced.

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Sat 05 Sep 2015 - 19:07:20 EDT

This archive was generated by hypermail 2.2.0 : Sun 06 Sep 2015 - 06:25:10 EDT