Re: [code] os.getenv('LANG') not working on osx

From: Mitchell <m.att.foicica.com>
Date: Tue, 12 Feb 2013 08:24:10 -0500 (Eastern Standard Time)

Hi Gilles,

On Tue, 12 Feb 2013, Gilles Grégoire wrote:

> Hello,
> I noticed that the localization file for my langage is not being used
> by textadept on OSX.
>
> Looking at the textadept code, I figured out that the current locale
> should be detected at line 24 in core/locale.lua
> There, Textadept calls os.getenv('LANG') to detect the current langage
> and load the appropriate langage file if it exists.
>
> It appears that in Textadept, os.getenv('LANG') always returns nil on
> OSX. Executing this lua code in the command entry:
> print(os.getenv('LANG'))
> will display:
> nil
>
> This bug is very strange because my own version of lua correctly
> reports fr_FR.UTF-8 when using os.getenv('LANG').

I don't have a Mac to test this on, but I think it has to do with GUI
applications not having access to shell environment variables[1]. The
solution should be in the link below.

Mitchell

[1]:
http://foicica.com/textadept/02_Installation.html#Environment.Variables

-- 
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 Tue 12 Feb 2013 - 08:24:10 EST

This archive was generated by hypermail 2.2.0 : Wed 13 Feb 2013 - 06:32:50 EST