Current Locale : I18N « JSP « Java






Current Locale

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>

<html>
<head><title><fmt:message key="Welcome" /></title></head>
<body>
<h2><fmt:message key="Hello" /> <fmt:message key="and" /> <fmt:message key="Welcome" /></h2>


Locale: <c:out value="${pageContext.request.locale.language}" />_<c:out value="${pageContext.request.locale.country}" /> 

<br /><br />

<fmt:formatNumber value="1000000" type="currency" />
    
</body>
</html>


           
       








Related examples in the same category

1.Locale info
2.Locale Display in a JSP
3.JSP: Define the string in tag (I18N)
4.JSP Internationalization and Localized Content 1JSP Internationalization and Localized Content 1
5.JSP Internationalization and Localized Content 2JSP Internationalization and Localized Content 2
6.JSP Internationalization and Localized Content:Currency Formatting and locales
7.JSP Internationalization and Localized Content: Date Formatting and locale
8.Internationalized Web Applications: JavaServer Pages