problem with uffi and gettext

Lam <[email protected]> Tue, 26 Aug 2003 19:03:52 +0200
Newsgroups gmane.lisp.uffi.general
Organization Tux
Message-ID <[email protected]>

hi
i try to use uffi to make a package cl-gettext 

i export some functions :

(uffi:def-function ("gettext" gettext)
		   ((msgid :cstring))
		   :returning :cstring)

...

(uffi:def-function ("textdomain" textdomain)
		   ((domainname :cstring))
		   :returning :cstring)


(uffi:def-function ("bindtextdomain" bindtextdomain)
		   ((domainname :cstring)
		    (dirname :cstring))
		   :returning :cstring)


all is ok when i compile it :

(asdf:oos 'asdf:load-op :cl-gettext)

; loading system definition from cl-gettext.asd into
; #<The ASDF1067 package, 0/9 internal, 0/9 external>
; Loading #p"/home/lam/src/cl-gettext/cl-gettext.asd".
; registering #<SYSTEM :CL-GETTEXT {481AFF65}> as CL-GETTEXT

; Python version 1.1, VM version Intel x86 on 26 AUG 03 06:46:42 pm.
; Compiling: /home/lam/src/cl-gettext/cl-gettext.lisp 26 AUG 03 06:45:27 pm

; Byte Compiling Top-Level Form:
; Byte Compiling Top-Level Form:
; Byte Compiling Top-Level Form:
; Byte Compiling Top-Level Form:
; Converted GETTEXT.
; Compiling DEF-FUNCTION ("gettext" GETTEXT):
; Converted DGETTEXT.
; Compiling DEF-FUNCTION ("dgettext" DGETTEXT):
; Converted DCGETTEXT.
; Compiling DEF-FUNCTION ("dcgettext" DCGETTEXT):
; Byte Compiling Top-Level Form:
; Converted NGETTEXT.
; Compiling DEF-FUNCTION ("ngettext" NGETTEXT):
; Converted DNGETTEXT.
; Compiling DEF-FUNCTION ("dngettext" DNGETTEXT):
; Converted DCNGETTEXT.
; Compiling DEF-FUNCTION ("dcngettext" DCNGETTEXT):
; Converted TEXTDOMAIN.
; Compiling DEF-FUNCTION ("textdomain" TEXTDOMAIN):
; Converted BINDTEXTDOMAIN.
; Compiling DEF-FUNCTION ("bindtextdomain" BINDTEXTDOMAIN):
; Converted BIND-TEXTDOMAIN-CODESET.
; Compiling DEF-FUNCTION ("bind_textdomain_codeset" BIND-TEXTDOMAIN-CODESET):
; Byte Compiling Top-Level Form:

; /home/lam/src/cl-gettext/cl-gettext.x86f written.
; Compilation finished in 0:00:01.


but i have problem when i use it :


(cl-gettext:bindtextdomain "cl-gettext" "/home/lam/src/cl-gettext/locale")

"/home/lam/src/cl-gettext/locale"
* (cl-gettext:textdomain "cl-gettext")

"cl-gettext"
* (cl-gettext:gettext "Close")

"Close" ; here i would like in fact "Fermer"


i try the same things with python-gettext module 
and i have "Fermer"
so i suppose i forgot something

i have make the repertory like this : 

locale/language/LC_MESSAGES/domain.mo

i  see  that  gettext  defined   language  by  searching  for  in  the
environment variables LANGUAGE, LC_ALL, LC_MESSAGES, and LANG

so my problem must come from theses variables ? 

have you got any idea ? 

thanks


-- 
Lam