© Peter Späth 2021
P. SpäthBeginning Java MVC 1.0https://doi.org/10.1007/978-1-4842-6280-1_8

8. Internationalization

Peter Späth1 
(1)
Leipzig, Sachsen, Germany
 

Java provides built-in internationalization support via resource bundles . It is possible to save text snippets in different languages in different language-related property files. Using tags, it is also possible to output numbers and dates in locale-specific formats, and Java MVC can handle user input based on the locale.

Language Resources

In standard JSP, language-related resources are addressed by the fmt:setBundle and fmt:bundle tags, and by the fmt:message tag, which uses the key attribute to refer to text from the bundle. You can, for example, write the following:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" ...

Get Beginning Java MVC 1.0: Model View Controller Development to Build Web, Cloud, and Microservices Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.