aboutsummaryrefslogtreecommitdiff
path: root/ellinika
diff options
context:
space:
mode:
Diffstat (limited to 'ellinika')
-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.