
BBjHttpResponse::setLocale
Description
In BBj 12.0 and higher, this method sets the locale of the response. It also sets the response's character encoding appropriately for the locale, if the character encoding has not been explicitly set using BBjHttpResponse::setContentType(String) or BBjHttpResponse::setCharacterEncoding(String).
This method may be called repeatedly to change locale and character encoding. It does not set the response's character encoding if it is called after BBjHttpResponse::setContentType(String) has been called with a charset specification or after BBjHttpResponse::setCharacterEncoding(String) has been called.
Syntax
Return Value |
Method |
void |
setLocale(Locale locale) |
Parameters
Variable |
Description |
locale |
the locale of the response |
Return Value
None.
Remarks
The example below shows setting a Locale within a BBjServlet.
Example
REM
Obtain the instance of the BBjAPI object |