Composite natively supports multiple languages and allows webmasters and editors to manage language specific versions of pages, xhtml templates, images, XSL etc.
This document briefly describes how to add and manage languages in Composite.
The Composite “Create new site” wizard will prompt you for a list of languages to install on the site. This selection will define the sites language list. XHTML templates, XSLT sources etc. will be automatically created for each language selected. By default most content will be in English and might require localization.
An autonomous sub site is automatically created for each language, named “(language name) Homepage”. Each sub site contains a search page, sitemap and news area.
When an editor creates a new page the language setting is automatically inherited from the “mother page”. The editor can easily override this selection if desired.
Once a site has been created, adding new languages to the site is done by executing a database script. The script requires information about the new language to add (LCID and language name, like“1030” and “Danish”) and the LCID of an existing language to copy XHTML templates and XSL from.
You can find a list of LCID codes here: /content/composite_developer/3x_technologies/front-end/intrinsic_indentifiers/writelcid/lcid_list
The script can be obtained by contacting our support department.
When executed the script will add the new language to the sites language list and generate the needed XHTML templates and XSL by copying the data from the source language.
The database script will not create any actual pages. To create a new sub site with the newly added language, the user must have Composite administrative privileges and execute the following steps:
At this point a sub site with the new language has been created – containing a single page. You can add new pages or copy existing pages from another sub site (using drag and drop, while holding down the CRTL key). If you copy a page, you need to edit it and change the language selection.
On the “Templates” tab you can see the XHTML templates for the site. When you edit a template you will get a tab for each language on the site – if your XHTML templates contains any text that need to be localized, you can make the changes here.
The XSLT sources for the site is located on the “Datamap” tab, below “Data Query XSL Definitions”. Like the XHTML templates, the XSL here has separate sources for each language. If a function need to be localized, you can make the changes here.
If your site contains different language versions, you can use different options to guide the user to the appropriate page.
The page located at the top most position in the “Pages” tree is the default start page, and this page will be shown when the URL of a user request has no path, and the host name part is not bound to another page. In other words, if you don’t change anything, all requests without a path specified will go to this page.
You can use this behavior to present all your visitors with an English (or other) version, and then guide them to their desired localized sub site by following as link (like “Deutch sprache” etc.). You can these links to the templates.
You can combine the strategy described above with a path based approach, where you use the path portion of the Friendly URL field (located on the Access tab when editing a page).
If you specify a Friendly URL path like “dk” on the Danish homepage, you can access the page using http://www.contoso.com/dk (where www.contoso.com is the host name of your site).
This is an easy way to distribute a language specific URL to customers etc. without having to obtain different domain names (like www.contoso.dk)
If your organization has multiple domain names with language specific extensions (like www.contoso.com and www.contoso.dk etc.) you can utilize this by writing the appropriate host name in the “Friendly URL” field on the localized homepage.
The host name match algorithm uses a “best match, right to left” strategy. This means that you can specify “contoso.com” as host name and Composite will use this page for all requests where the host name ends with “contoso.com” – including “www.contoso.com“. You can even shorten the host name to “.com”.
Please note that you should configure DNS and IIS to “point” the host name to your Composite site. Configuring the host name element in Composite alone will not do the trick.