improve i18n support

This commit is contained in:
Sebastian Sdorra
2011-03-31 10:52:25 +02:00
parent ca7c59aea5
commit 9739b216c4
2 changed files with 14 additions and 7 deletions

View File

@@ -117,15 +117,15 @@ public class TemplateServlet extends HttpServlet
params.put("locale", locale);
String shortLocale = locale;
int i = shortLocale.indexOf("_");
String country = locale;
int i = country.indexOf("_");
if (i > 0)
{
shortLocale = shortLocale.substring(0, i);
country = country.substring(0, i);
}
params.put("shortLocale", shortLocale);
params.put("country", country);
String templateName = getTemplateName(contextPath, request.getRequestURI());
Writer writer = null;