Setting LOCALEDIR in libgphoto2

Jim Easterbrook <[email protected]> Thu, 21 Apr 2022 16:07:21 +0100
Newsgroups gmane.comp.multimedia.gphoto.devel
Message-ID <[email protected]>
Hello again,

(I'm having a gphoto2 day today.)

I'm looking into localising the libgphoto2 that's included with the 
python-gphoto2 package. I've discovered that the gp_abilities_list_new 
function calls bindtextdomain with a locale directory fixed when 
./configure is run.

I assume this means that, even if I did find a way to call 
bindtextdomain with the python package's locale dir, it would revert to 
the compile time one next time gp_abilities_list_new is called.

As it says in the source code:

  * We do this here because everybody needs to call this function
  * first before accessing a camera. Pretty ugly, but I don't know
  * an other way without introducing a global initialization
  * function...

I assume I can't persuade you to change the libgphoto2 API by adding an 
initialisation function. Is there any chance of making LOCALEDIR 
settable with an environment variable, like CAMLIBS and IOLIBS are?
-- 
Jim Easterbrook                 <http://www.jim-easterbrook.me.uk/>