i18n filter ver. 1.3

This is a Java servlet filter (as per Servlet API 2.3). This filter provides a simple tool for the localization. Incoming requests say to some page index.jsp could be redirected to page index-eng.jsp, index-ru.jsp etc. depending on the locale in the request.

How to use it:

a) download i18nflt.jar and save it in WEB-INF/lib

b) describe this filter in web.xml.


c) describe a mapping for this filter in web.xml


in this case filter will be on for the each .jsp file for example.

Suppose now mypage.jsp is requested and incoming locale is English. Filter will check out file mypage-eng.jsp. If such a file exists than request will be redirected, otherwise it will be processed as is.

You can add also an additional parameter suffix, describes how to find a localized version of the file. Here FILE is a name of the source file (without extension), LANG - detected language, EXT - an original extension.


default suffix is FILE-LANG.EXT.

   For downloading:

    i18n filter:  i18nflt.jar

 ©  Coldbeans     Comments?

See also JSOS - the largest collection of servlets and filters.

Also in JSOS: