Custom JSP taglib. These tags provide functionality to the internationalization your web applications. The term i18n comes from the simple fact that the word "internationalization" starts with the letter I, ends with the letter N and has 18 letters.
For example:
in this example bundle points to files in CLASSPATH (e.g. in WEB-INF/classes) with names like constants_en.properties, constants_en_US.properties, constants_fr.properties etc.
Tags are:
setBundle
Tag loads the bundle for the provided baseName. Tag may use locale from browser preferences or directly defined by parameter. Parameters are:
1) baseName Optional parameter. Describes a base name for properties files. Default
value is ApplicationResources.
2) id ID for loaded bundle
3) scope Optional parameter. Describes a scope for
loaded bundle. Possible values are page, request, session or application.
Default value is session.
4) locale Optional parameter. Describes a locale for bundle.
Without this parameter tag uses locale from browser preferences.
getMessage
Body tag. This tag looks up a key in the localize bundle and prints the value. Body will be executed if key is not defined. Parameters are:
1) key key for lookup
2) id ID for loaded bundle
3) scope Optional parameter. Describes a scope for
loaded bundle. Possible values are page, request, session or application.
Default value is session.
ifdef
Body tag. Body will be executed if key is defined in the given bundle. Parameters are:
1) key key for lookup
2) id ID for loaded bundle
3) scope Optional parameter. Describes a scope for
loaded bundle. Possible values are page, request, session or application.
Default value is session.
ifndef
Body tag. Body will be executed if key is not defined in the given bundle. Parameters are:
1) key key for lookup
2) id ID for loaded bundle
3) scope Optional parameter. Describes a scope for
loaded bundle. Possible values are page, request, session or application.
Default value is session.
for downloading:
Library: i18ntag.jar Description: taglib.tld
See also Coldtags suite - the largest collection of custom JSP tags.