Skip to main content
Kinetic Community

JSTL Internationalization Tag Library

The JSTL Internationalization tag library contains a number of tags related to language and formatting conventions of client locales.

Getting Started

Configuration

The JSTL Internationalization tag library can be declared with the following taglib directive:

<%-- bundle/initialization.jspf --%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

Usage

<%-- form.jsp --%>
...
<fmt:message key="Choose"/>
...

Tags

The following tags are provided in the internationalization tag library:

<fmt:formatNumber>

Renders a numerical value with specific precision or format.

<fmt:parseNumber>

Parses the string representation of a number, currency, or percentage.

<fmt:formatDate>

Formats a date and/or time using the supplied styles and pattern.

<fmt:parseDate>

Parses the string representation of a date and/or time.

<fmt:bundle>

Loads a resource bundle to be used by its tag body.

<fmt:setLocale>

Stores the given locale in the locale configuration variable.

<fmt:setBundle>

Loads a resource bundle and stores it in the named scoped variable or the bundle configuration variable.

<fmt:timeZone>

Specifies the time zone for any time formatting or parsing actions nested in its body.

<fmt:setTimeZone>

Stores the given time zone in the time zone configuration variable.

<fmt:message>

Displays an internationalized message.

<fmt:requestEncoding>

Sets the request character encoding.

Related