Use start_log and stop_log to mark the events you want to log in your code.

8-44 Oracle Fusion Middleware Developers Guide for Oracle Portal wwlog_api.log p_domain = DOMAIN, p_subdomain = SUBDOMAIN, p_name = l_user, p_action = l_action, p_information = l_information, p_url = l_url, p_row_count = 0, p_elapsed_time= l_elapsed_time; ... 4. Optionally, if you want to see this portlet on a page and it is not already in the Portlet Repository, refer to the instructions in Section 8.3.2, Implementing the Provider Package for information on how to add it. 5. Once your portlet appears in the repository, you can add it to a page to test it. To add your portlet to a page, follow the instructions in Oracle Fusion Middleware Users Guide for Oracle Portal.

8.11 Writing Multilingual Portlets

Oracle Portal has a robust set of APIs for interacting with Oracle Portal multilingual storage facility. This storage facility provides a mechanism for storing and retrieving strings in different languages. These APIs abstract the native multilingual functionality and provide developers with a powerful storage mechanism for developing providers that support different language environments. Multilingual services are available through the wwnls_api package. These services include the following key features: ■ The multilingual APIs enable the provider to load several translations for the strings displayed in their portlets. Once the strings have been loaded, the provider can call the APIs to retrieve the strings from the multilingual table as needed. ■ Context APIs retrieve the users language and the appropriate translation for that language. The Context APIs determine the users language environment from the language setting in the browser. When a requested translation does not exist, the APIs return the base language translation. For example, assume that the providers register procedure loads US and French translations for the portlet title. When the portlet is rendered, the provider implementation retrieves the portlet title string from the table and displays the following results: ■ A request for a French string causes the portlet title to appear in French. ■ A request for a US string causes the portlet title to appear in US English. ■ A request for a Chinese string causes the portlet title to appear in US English because we did not load a translation for the Chinese language.

8.11.1 Using Multilingual Support

In general, you can set up multilingual support as follows: 1. Load your string definitions into the database using the string equivalents for each language you intend to use. For this purpose, call the wwnls_api.add_string or wwnls_api.set_string with an appropriate domain, subdomain, error message name, and error text combination. 2. Retrieve the strings you require with wwnls_api.get_string for the language that you desire.