diff options
| -rw-r--r-- | server.go | 5 | ||||
| -rw-r--r-- | views/footer.html | 2 |
2 files changed, 7 insertions, 0 deletions
@@ -54,9 +54,14 @@ func CreateNewEntry(email, password string) error { func ExecTemplate(template string, w http.ResponseWriter, r *http.Request, flash Flash) error { l := GetLanguage(r) flash.Language = l + + if flash.Language == "" { + flash.Language = "en" + } if l != "" { l = "_" + l } + template = template + l + ".html" index := mainTempl.Lookup(template) diff --git a/views/footer.html b/views/footer.html index 007474b..db85f61 100644 --- a/views/footer.html +++ b/views/footer.html @@ -27,6 +27,7 @@ var u="//a.iamfabulous.de/"; _paq.push(['setTrackerUrl', u+'piwik.php']); _paq.push(['setSiteId', 12]); + {{if .}} /* _paq.push([function () { if (!this.getCustomVariable(1)) { @@ -35,6 +36,7 @@ }]); */ _paq.push(['setCustomVariable', 1, "Language",{{.}}, "visit"]); + {{end}} var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); })(); |
