Using Multilingual Support Writing Multilingual Portlets

8-46 Oracle Fusion Middleware Developers Guide for Oracle Portal provider,services,ptldevtmmsg,us,Web Services Portlet Timed Out.; wwnls_api.set_string provider,services,ptldevtmmsg,d,Zeitüeberschreitung aufgetreten in Web Services Portlet. -d;

8.11.2.2 Retrieving Language Strings

The services example, located in ..\pdkplsql\pdk\plsql\svcex in PDK-PLSQL pdkplsql.zip, illustrates how you can implement multilingual support. You can browse through this example as follows to see how to retrieve strings for multilingual support: 1. Open the services_portlet.pkb file in an editor. 2. The domain and subdomain definitions for your language strings are provided with aliases in the constants part of your portlet definition. DOMAIN constant varchar230 := provider; SUBDOMAIN constant varchar232 := services; PORTLET_PATH constant varchar2256:= oracle.portal.pdk.servicesportlet; PREFNAME_STRING constant varchar230 := services_string; PREFNAME_TITLE constant varchar230 := services_title; 3. Find the get_portlet_info function. Notice the calls to wwnls_api.get_ string to populate the portlet title, name, and description. function get_portlet_info p_provider_id in integer ,p_language in varchar2 return wwpro_api_provider.portlet_record is l_portlet wwpro_api_provider.portlet_record; begin l_portlet.id := services_provider.SERVICES_PORTLET_ID; l_portlet.provider_id := p_provider_id; l_portlet.language := p_language; l_portlet.title := wwnls_api.get_string p_domain = DOMAIN ,p_sub_domain = SUBDOMAIN ,p_name = ptldeftitle ,p_language = p_language ; l_portlet.description := wwnls_api.get_string p_domain = DOMAIN ,p_sub_domain = SUBDOMAIN ,p_name = ptldefdesc ,p_language = p_language ; l_portlet.name := wwnls_api.get_string p_domain = DOMAIN ,p_sub_domain = SUBDOMAIN ,p_name = ptldefname ,p_language = p_language ; ... Creating PLSQL Portlets 8-47 4. Browse the rest of the file to examine other usage examples of wwnls_api.get_ string, which is used in several other places in services_portlet.pkb. 5. 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. 6. 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.12 Enhancing Portlets for Mobile Devices

This section explains how to go about enhancing a portlet with PDK-PLSQL for a mobile device. Before proceeding with this section, you should familiarize yourself with the guidelines for building mobile-enabled portlets, Section 8.1.3, Guidelines for Mobile Portlets , and the methods of building portlets with PDK-PLSQL, Section 8.2, Building PLSQL Portlets with the PLSQL Generator and Section 8.3, Building PLSQL Portlets Manually . To properly build a portlet for a mobile device, do the following: 1. Set the portlet record attributes to support mobile output. Requests arriving from mobile devices through the mobile gateway need to be answered with OracleAS Wireless XML using the textvnd.oracle.mobilexml content type in the header. A mobile-enabled portlet must specify that it can handle these types of requests and produce the mobile content accordingly. Table 8–6 lists the portlet record attributes pertinent to mobile portlets and explains how you should specify them. Table 8–6 Portlet Record Attributes Attribute Description accept_content_type Specify a comma-delimited list of the content types that the portlet produces. If the portlet can produce both HTML and OracleAS Wireless XML, the string would be: texthtml, textvnd.oracle.mobilexml If the portlet can produce only OracleAS Wireless XML, the string would be: textvnd.oracle.mobilexml mobile_only Indicate whether the portlet is available only to mobile pages. TRUE declares the portlet as mobile only, and it will not appear in the Add Portlets page for a standard page. FALSE declares the portlet as mobile and standard, and it will appear in the Add Portlets page for both standard and mobile pages. If the portlet only produces OracleAS Wireless XML and you set this flag to FALSE, the OracleAS Wireless XML is automatically transformed into HTML for desktop devices such as a normal PC Web browser. This functionality enables you to develop portlets that output only OracleAS Wireless XML but can be viewed on standard pages for desktop access as well as for mobile access. short_title Enter a shorter version of the portlet title. This title is used on mobile devices because it is more likely to fit the smaller screen. If you do not set a short title, then the portlet title is used instead.