diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2006-03-22 21:29:55 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2006-03-22 21:29:55 +0000 |
commit | fb097dcbc2d2753f9fb4a566d94a003803a130bb (patch) | |
tree | 4eb5ed51cbb0087d5a962eb9dabc05e0ed659b6d | |
parent | 40d32f7aebac91e8b5996a2531aa7933974af0ac (diff) | |
download | ellinika-fb097dcbc2d2753f9fb4a566d94a003803a130bb.tar.gz ellinika-fb097dcbc2d2753f9fb4a566d94a003803a130bb.tar.bz2 |
Set INFO handler
git-svn-id: file:///home/puszcza/svnroot/ellinika/trunk@388 941c8c0f-9102-463b-b60b-cd22ce0e6858
-rw-r--r-- | xml/lingua.conf.in | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/xml/lingua.conf.in b/xml/lingua.conf.in index 2cba2e0..a953c4f 100644 --- a/xml/lingua.conf.in +++ b/xml/lingua.conf.in @@ -8,7 +8,10 @@ <BASE HREF="=BASE_HREF=" /> <GUILE> <![CDATA[ -(use-modules (xmltools xmltrans)) +(use-modules (xmltools xmltrans) + (xmltools gamlet) + (xmltrans lingua) + (xmltools dict)) (xmltrans:end-tag "KATHAREVUSA" @@ -40,7 +43,35 @@ (tag attr text) (list "<div class=\"permanent-article\">" text "</div>")) -#f +(gamlet:set-handler "INFO" + (lambda (. args) + (display "<ul class=\"menu\">") + (format #t "<li class=\"group\"><div class=\"group\">~A</div>" + (lingua:gettext "This page in other languages")) + (display "<ul class=\"menu\">") + (let* ((name (string-split + (gamlet:current-output-file-name) #\/)) + (rest (substring (gamlet:current-output-file-name) + (1+ (string-length (car name)))))) + (for-each + (lambda (lang) + (cond + ((not (string=? (list-ref lang 0) (car name))) + (if (not (null? args)) + (format #t "<li><a href=\"~A@@args@@\">~A</a></li>" + ((lingua:attr "LINGUA" (car args)) + #:lang (list-ref lang 0) + #:ter (list-ref lang 1)) + (list-ref lang 2)) + (format #t "<li><a href=\"~A/~A\">~A</a></li>" + (list-ref lang 0) + rest + (list-ref lang 2)))))) + '(("pl" "PL" "Polski") + ("ru" "RU" "Русский") + ("uk" "UA" "Українська")))) + (display "</li></ul></ul>"))) +#f ]]> </GUILE> </CONFIG> |