您可以使用 OCE 工具程式,針對翻譯、搜尋頁面和內容項目編製多語言網站 (MLS) 的索引。
您可以在發布網站之前,建立多語言網站索引並加以測試。請使用 OCE 工具 cec index-site
命令編製多語言網站的索引。前往 cec-components
目錄,不使用任何選項來發出此命令,即可檢視此命令的說明資訊:
cec-components> cec index-site Usage: cec index-site <site> Create content item for each page with all text on the page. If the page index content item already exists for a pate, updated it with latest text on the page. Specify -c <contenttype> to set the page index content type. Optionally specify -p to publish the page index items after creation or update. Options: --contenttype, -c <contenttype> page index content type --publish, -p publish page index items --help, -h Show help [boolean] Examples: cec index-site Site1 -c PageIndex cec index-site Site1 -c PageIndex -p
每個頁面和每種語言都會有頁面索引項目。為每種語言建立的頁面索引內容項目,會以預設語言頁面索引項目的翻譯方式建立。當您在執行中網站進行查詢時,搜尋和內容清單便會從網站 URL 取得語言。這會自動篩選搜尋。
您必須先編製索引並加以翻譯,才能夠發布多語言網站,因此需要翻譯工作。請參閱在 Oracle Content Management 伺服器中建立新網站或資產翻譯工作。
必須有預設語言英文。對於每種支援的語言 (必要和選擇性),請執行索引建立作業,並且建立索引項目的翻譯。如果執行兩次索引,則只會進行更新。
使用 OCE 工具程式命令編製索引、翻譯以及發布多語言網站:
建立網站的內容類型,並讓它可在儲存區域中使用。請參閱建立網站頁面文字的內容類型。
選取驗證原則。
按一下左側導覽功能表中的資產。
在資產功能表中選擇本地化規定。
選取一個本地化規定。
必要時修改本地化規定,以包含您想要用於編製索引與翻譯網站的語言。例如,如果規定只有英文,您可以新增法文和西班牙文。
所有的翻譯都是從英文進行。
下載翻譯工作。您只能翻譯網站中使用的資產。
翻譯網站。網站翻譯可以手動或透過整合式連線器完成。
翻譯完成後上傳翻譯工作。
使用 cec index-site
命令對網站進行編製索引。指定 -c <contenttype> 以設定頁面索引內容類型。
您也可以指定 -p
選項以發布網站。然後您可以在發布對即時網站的變更之前,驗證編製索引與翻譯。
例如,下列 cec index-site
命令會為使用英文、法文和西班牙文的網站建立網站索引。網站所支援的語言是來自指定的本地化規定,包括預設語言。
cec index-site Demo2 -c search_content_type -p - Logged in to remote server: server-URL - establish user session - get CSRF token - site: Demo2, default language: en-US, channel token: channel-token - site localization policy: search_localization_policy - query site repository - query content type search_content_type - query site structure - content types used in the site: search_blog - query page data - query content on the pages - will create 11 page index items - will update 0 page index items - will remove 1 page index items - create page index item for Blog - create page index item for Privacy Policy - create page index item for Search - create page index item for Components - create page index item for Navigtion - create page index item for Detail Page - create page index item for Pages - create page index item for Page Content - create page index item for Developing Templates - create page index item for Themes - add page index items to site channel - remove page index items for page Search from site channel - will create/update translate for fx-FR,es-ES - query site stucture with locale fr-FR - query page data (fr-FR) - query content on the pages (fr-FR) - will create 11 page index items (fr-FR) - will update 0 page index items (fr-FR) - will remove 1 page index items (fr-FR) - create page index item for Themes (fr-FR) - create page index item for Navigation (fr-FR) - create page index item for Pages (fr-FR) - create page index item for Detail Page (fr-FR) - create page index item for Search (fr-FR) - create page index item for Page Content (fr-FR) - create page index item for Components (fr-FR) - create page index item for Developing Templates (fr-FR) - create page index item for Blog (fr-FR) - create page index item for Home (fr-FR) - create page index item for Privacy Policy (fr-FR) - add page index items to site channel - set page index items in fr-FR as translated - remove page index items for page Search from site channel - query site stucture with locale es-ES - query page data (es-ES) - query content on the pages (es-ES) - will create 11 page index items (es-ES) - will create 0 page index items (es-ES) - create page index item for Pages (en-ES) - create page index item for Home (en-ES) - create page index item for Themes (en-ES) - create page index item for Components (en-ES) - create page index item for Privacy Policy (en-ES) - create page index item for Detail Page (en-ES) - create page index item for Page Content (en-ES) - create page index item for Navigation (en-ES) - create page index item for Developing Templates (en-ES) - create page index item for Search (en-ES) - create page index item for Blog (en-ES) - add page index items to site channel - set page index items in es-ED as translated - publish job submitted - publish in proogress - publish in progress - publish page index items finished
發布網站以包含翻譯。