Databases Reference
In-Depth Information
First, add an entry to the navigation bar in the Shared Components of the application.
In the example shown in Figure 5-28, the new entry (link) will call page 111 using the request
BRANCH TO PAGE ACCEPT . This will execute the processing and branching of the page 111 only and not the
rendering part. The P111 LAST PAGE will be also set to the current page ID using the variable APP PAGE ID .
This will be used to to branch back to the current page.
Figure 5-28. Navbar entry for switching the language
Next, create a blank page 111, and edit it. Add an HTML region called Switch Lang and add a Page
Item P111 LAST PAGE , which will be used to store the page id of the calling page.
Then add a PL/SQL process that will switch the language on submit after computations and
validations that contains
if apex util.get session lang = 'en-ca'
then apex util.set session lang('fr-ca');
else apex util.set session lang('en-ca');
end if;
This PL/SQL checks the current language of the application with APEX UTIL.GET SESSION LANG ; if it is
English, it sets the language to French. If not, it sets the language to English.
Finally, add a branch to page 111 to return to the calling page using P111 LAST PAGE , as shown in
Figure 5-29.
Search WWH ::




Custom Search