aboutsummaryrefslogtreecommitdiff
path: root/xml/lingua.conf.in
blob: b6b7073a29eb6bfb3371a228909bea399d14e5ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
 <LOGO SRC="graphics/parthenon-gnu.png" ALT=" [A GNU in front of the Parthenon] " />
 <DIRECTORY CGIBIN="/cgi-bin" />
 <DIRECTORY TMP="=TMPDIR=" />
 <DIRECTORY OUT="=OUTDIR=" />
 <DIRECTORY TARGET="=TARGET_DIR=" />
 <BASE HREF="=BASE_HREF=" />
 <GUILE>
  <![CDATA[
(use-modules (xmltools xmltrans)
             (xmltools gamlet)
	     (xmltrans lingua)
             (xmltools dict))

(xmltrans:end-tag
 "KATHAREVUSA"
 (tag attr text)
 (list "<div class=\"katharevusa\">" text "</div>"))

(xmltrans:end-tag
 "news"
 (tag attr text)
 (list "<div id=\"news-content\"><div id=\"news\">" text "</div></div>"))

(xmltrans:end-tag
 "news:summary"
 (tag attr text)
 (list "<div id=\"news-summary\">" text "</div>"))

(xmltrans:end-tag
 "news:article"
 (tag attr text)
 (list "<div id=\"news-article\">" text "</div>"))

(xmltrans:end-tag
 "news:header"
 (tag attr text)
 (list "<div class=\"news-header\">" text "</div>"))

(xmltrans:end-tag
 "news:permanent-article"
 (tag attr text)
 (list "<div class=\"permanent-article\">" text "</div>"))
 
(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=? (car lang) (car name)))
			     (if (not (null? args))
				 (format #t "<li><a href=\"~A@@args@@\">~A</a></li>"
					 ((lingua:attr "LINGUA" (car args))
					  #:lang (car lang))
					 (cdr lang))
				 (format #t "<li><a href=\"~A/~A\">~A</a></li>"
					 (car lang)
					 rest
					 (cdr lang))))))
			 '(("pl" . "Polski")
			   ("ru" . "Русский")
			   ("uk" . "Українська"))))
		      (display "</ul></li></ul>")))
#f
 ]]>
 </GUILE>
</CONFIG>

<!-- Local Variables: -->
<!-- mode: sgml -->
<!-- End: -->

Return to:

Send suggestions and report system problems to the System administrator.