aboutsummaryrefslogtreecommitdiff
path: root/ellinika/cgi.scmi
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2006-03-23 09:10:31 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2006-03-23 09:10:31 +0000
commit7518cda05846fe76e026caaea82417ff4c19d40d (patch)
tree0bc9c33bba1cd65e2ae19cb543b8026e49cc3b2a /ellinika/cgi.scmi
parentef11b43397c688b9583aa71e087c0576e5621740 (diff)
downloadellinika-7518cda05846fe76e026caaea82417ff4c19d40d.tar.gz
ellinika-7518cda05846fe76e026caaea82417ff4c19d40d.tar.bz2
(locale-path): New public variable
(locale-dir): Removed (ellinika-cgi-init): Use i18n to set-up localization git-svn-id: file:///home/puszcza/svnroot/ellinika/trunk@394 941c8c0f-9102-463b-b60b-cd22ce0e6858
Diffstat (limited to 'ellinika/cgi.scmi')
-rw-r--r--ellinika/cgi.scmi16
1 files changed, 7 insertions, 9 deletions
diff --git a/ellinika/cgi.scmi b/ellinika/cgi.scmi
index c457ca6..b4da8f9 100644
--- a/ellinika/cgi.scmi
+++ b/ellinika/cgi.scmi
@@ -21,13 +21,14 @@
(define-module (ellinika cgi))
(use-modules (www cgi)
- (gamma gettext))
+ (gamma gettext)
+ (ellinika i18n))
;;; User-definable variables
(define-public base-dir "=PREFIX=")
(define-public html-dir "=HTMLDIR=")
(define-public sysconf-dir "=SYSCONFDIR=")
-(define-public locale-dir "=LOCALEDIR=")
+(define-public locale-path "=LOCALEDIR=:/usr/share/locale:/usr/local/share/locale")
(define-public ref-loc #f)
(define-public dict-cgi-path "cgi-bin/dict.cgi")
@@ -138,14 +139,11 @@ THUNK.
(cond
((cgi:value "LANG") =>
(lambda (x)
- (if (and (file-exists? (template-file x template-file-name))
- (false-if-exception (setlocale LC_ALL x)))
+ (if (file-exists? (template-file x template-file-name))
(set! target-language x)))))
-
;;; Initialize i18n
- (setlocale LC_ALL target-language)
- (bindtextdomain "=PACKAGE=" locale-dir)
- (bind_textdomain_codeset "=PACKAGE=" "UTF-8")
- (textdomain "=PACKAGE="))
+ (let ((x (locale-setup target-language "=PACKAGE=" locale-path)))
+ (if x
+ (set! target-language x))))
;;; End of cgi.scmi

Return to:

Send suggestions and report system problems to the System administrator.