summaryrefslogtreecommitdiffstats
path: root/api/context.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2016-01-21 14:15:44 -0600
committer=Corey Hulen <corey@hulen.com>2016-01-21 14:15:44 -0600
commit221985435966dbf583d3e367c243822e338b6bc4 (patch)
tree140d0b1318df0d5b11ef21eacf7cfa7545498585 /api/context.go
parent8cc45a2e08c3eaaa66619cc7ee9dfc7ff49b388f (diff)
downloadchat-221985435966dbf583d3e367c243822e338b6bc4.tar.gz
chat-221985435966dbf583d3e367c243822e338b6bc4.tar.bz2
chat-221985435966dbf583d3e367c243822e338b6bc4.zip
PLT-7 client side infra
Diffstat (limited to 'api/context.go')
-rw-r--r--api/context.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/api/context.go b/api/context.go
index 5880842b6..f47ed1c30 100644
--- a/api/context.go
+++ b/api/context.go
@@ -31,6 +31,7 @@ type Context struct {
siteURL string
SessionTokenIndex int64
T goi18n.TranslateFunc
+ Locale string
}
type Page struct {
@@ -87,7 +88,7 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
l4g.Debug("%v", r.URL.Path)
c := &Context{}
- c.T = utils.GetTranslations(w, r)
+ c.T, c.Locale = utils.GetTranslationsAndLocale(w, r)
c.RequestId = model.NewId()
c.IpAddress = GetIpAddress(r)