Introduction to Multi-Lingual Support

14-4 Oracle Fusion Middleware Developers Guide for Oracle Portal -- Add an item that resides on the same server as the portal content repository -- database. l_item_masterthing_id := wwsbr_api.add_item p_caid = 53, - A known page group ID. p_folder_id = 1, - A known page ID. p_display_name = My File, p_type_id = wwsbr_api.ITEM_TYPE_FILE, p_type_caid = wwsbr_api.SHARED_OBJECTS, p_region_id = 513, - A known region on the page. p_description = Description of my file, p_file_filename = docs_for_uploadEnglish_File.txt ; -- Note that if the default language was not American then OracleAS Portal -- would in addition automatically create a translation of the item in the -- default language. -- -- Determine the item id. select id into l_item_id from wwsbr_all_items where masterid = l_item_masterthing_id and caid = l_site_id and language = wwctx_api.get_nls_language and is_current_version = 1; -- Change the language context to French. wwctx_api.set_nls_language p_nls_language = wwnls_api.FRENCH ; -- Modify item adding its translation and any translated attributes. l_item_masterthing_id2 := wwsbr_api.modify_item p_master_item_id = l_item_masterthing_id, p_item_id = l_item_id, p_caid = l_site_id, p_folder_id = l_page_id, p_display_name = Mon Fichier, p_description = Description du fichier, p_file_filename = docs_for_uploadFrench_File.txt ; -- Process cache invalidation messages. wwpro_api_invalidation.execute_cache_invalidation; exception ... end; For information about the add_item API used in Example 14–3 , refer to Section 12.4, Creating Items . For information about the modify_item API, refer to Section 11.2.2, Editing an Item .

14.6 Translations and Item Versioning

If you attempt to create a new version of an item in a nondefault language, by setting p_addnewversion to TRUE using modify_item API, a new version is not created; a new translation is added instead. When using versioning in conjunction with translations, we recommend that you create new versions of items in the default language and then translate the new version of the item.