Commits

shl...@6a489e09-e8c2-0310-a3fb-a128a961c0b2  committed 3cc24f9

Implemented a lang and charset variables for setting the language and
charset.

  • Participants
  • Parent commits 249bbe5

Comments (0)

Files changed (4)

File installer/wml/Makefile.am

 
 wmlfilesdir = $(wmldir)
 
-WML_FILES = quadpres_main.wml
+WML_FILES = quadpres_main.wml wml_helpers.wml
 
 wmlfiles_DATA = $(WML_FILES)
 

File installer/wml/quadpres_main.wml

+#include "wml_helpers.wml"
+
 <:{
 
     use Shlomif::Quad::Pres;
 }:>
 </define-tag>
 
+<default-var "lang" "en-US" />
+<default-var "charset" "iso-8859-1" />
+
 #include "themes/$(THEME)/template.wml"
 
 <define-tag points endtag="required">

File installer/wml/themes/shlomif-text/template.wml

 <restore withkey />
 </define-tag>
 
-
-<?xml version="1.0" encoding="iso-8859-1"?>
+<?xml version="1.0" encoding="<get-var charset />"?>
 <!DOCTYPE html
      PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<get-var lang />" lang="<get-var lang />">
 <head>
+<meta http-equiv="content-type" content="text/html; charset=<get-var charset />" />
 <link rel="stylesheet" href="<qp:contentsurl />style.css" type="text/css" />
 <qp:head:links />
 <title>{#SUBJECT_LOC#}</title>

File installer/wml/wml_helpers.wml

+<define-tag default-var>
+<if <var-exists "%0" /> 
+    ""
+    <set-var %0="%1" />
+    />
+</define-tag>
+