*/\r
package com.gitblit.wicket;\r
\r
+import java.util.Locale;\r
+\r
import org.apache.wicket.Application;\r
import org.apache.wicket.Page;\r
import org.apache.wicket.Request;\r
\r
import com.gitblit.GitBlit;\r
import com.gitblit.Keys;\r
+import com.gitblit.utils.StringUtils;\r
import com.gitblit.wicket.pages.ActivityPage;\r
import com.gitblit.wicket.pages.BlamePage;\r
import com.gitblit.wicket.pages.BlobDiffPage;\r
\r
@Override\r
public final Session newSession(Request request, Response response) {\r
- return new GitBlitWebSession(request);\r
+ GitBlitWebSession gitBlitWebSession = new GitBlitWebSession(request);\r
+\r
+ String forcedLocale = GitBlit.getString(Keys.web.forceDefaultLocale, null);\r
+ if (!StringUtils.isEmpty(forcedLocale)) {\r
+ gitBlitWebSession.setLocale(new Locale(forcedLocale));\r
+ }\r
+ return gitBlitWebSession;\r
}\r
\r
@Override\r