To create a locale-aware set of web pages, the choices are
Accept-language
HTTP header
hello.var
en
and fr
..../hello.var
..../en/hello.html
..../fr/hello.html
hello.html
is
hello.html
is
<Directory "/home/httpd/html/i18n/webchoices/server-multiviews">
Options MultiViews
</Directory>
or by having a file .htaccess
in the directory
with contents
options MultiViews
.htaccess
hello.en.html
hello.fr.html
.html
extension!
Accept-Language
header and
return a preferred locale or a list of all locales
hello
and fr_FR
it could create a name of
fr_FR/hello.jsp
ServletContext.getNamedDispatcher()
which uses the
name of a JSP
web.xml
file in WEB-INF
can map names
to JSP compiled classes
<servlet>
<servlet-name>hello_fr_jsp</servlet-name>
<servlet-class>org.apache.jsp.jsp.hello_fr_jsp</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>fr_hello_jsp</servlet-name>
<url-pattern>/jsp/fr/hello.jsp</url-pattern>
</servlet-mapping>
en
and fr
directories - it could call servlets or JSP pages, and there
could be different directory structures
locale
parameter and then could set its own locale
for e.g. date formatting