- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 13 Aug 2009 17:28:36 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/action In directory hutz:/tmp/cvs-serv14852/src/org/w3c/unicorn/action Modified Files: Tag: dev2 IndexAction.java Log Message: language negociation Index: IndexAction.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/Attic/IndexAction.java,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -d -r1.1.2.7 -r1.1.2.8 --- IndexAction.java 13 Aug 2009 13:42:41 -0000 1.1.2.7 +++ IndexAction.java 13 Aug 2009 17:28:34 -0000 1.1.2.8 @@ -18,22 +18,25 @@ private static final long serialVersionUID = 1L; private static Logger logger = Logger.getLogger("Index"); private VelocityContext velocityContext; - private ArrayList<String> templateList; + //private ArrayList<String> templateList; @Override public void init() throws ServletException { super.init(); - templateList = new ArrayList<String>(); + //templateList = new ArrayList<String>(); } @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - templateList.clear(); + //templateList.clear(); resp.setContentType("text/html"); // Language negotiation String langParameter = req.getParameter("lang"); + if (langParameter == null || !Framework.getLanguageProperties().containsKey(langParameter)) + langParameter = Language.negociate(req.getLocales()); + velocityContext = new VelocityContext(Language.getContext(langParameter)); //Locale lang = LanguageNegociator.negociate(langParameter, req.getLocales());
Received on Thursday, 13 August 2009 17:28:49 UTC