You use the Switch servlet bean to generate user messages dynamically according to the event that has occurred. When an error event or any other event that generates a user message occurs, a parameter is set indicating that a message should be displayed. An additional parameter, which is the “key,” is set that indicates which message should be displayed. The Switch servlet bean generates the text contained within the <oparam></oparam> tags for a given key, and this is the text you would translate for each locale in a multi-locale Web site.

You could then use any one of the methods described earlier in this chapter to determine the page that is appropriate for each user’s locale (for example, you could use the locale property in the user profile).

In the following JSP example, you would translate the text that is shown in italics:

<dsp:oparam name="keyA">
Text to translate
</dsp:oparam>

For further information on translating text within content pages, see Translating Content Pages. For more information on using the Switch servlet bean, refer to the ATG Page Developer's Guide.

 
loading table of contents...