Show navigation | Frontpage | Contact us | Sitemap

Adding a new language to the Composite administrative GUI

This document describes how to create the XML files that add a new language to the administrative module in Composite. It is presumed that you have a “clean system” that meet the system requirements of Composite.

This article should be read by people charged with the task of translating the administrative interface of Composite to a new language.

Preparing your system

  1. Install Composite
    See the readme file for system requirements etc. Do not install in a production environment – use a test/development server.

  2. Create a new website
    Use the “Create new website” shortcut located in your programs menu. When prompted for a administrative GUI language, just select “English”

  3. Edit the Language XML Schema
    Edit the file <Composite Root>\Localization\StringSet.xsd and add support for nodes containing the language you want to add, ie

    <xs:element name="Swedish" minOccurs="0" maxOccurs="1"/>

    You might have received a pre-edited version of this file from Composite.

  4. Edit the Website Configuration XML Schema
    Edit the file <Composite Root>\Schemas\application.config.xsd and add support for the language name as a value in the “language” element.

    <xs:enumeration value="Swedish" />

    You might have received a pre-edited version of this file from Composite.

  5. Edit the configuration for the new website you created
    Edit the file <Composite Root>\Configuration\<site name>.config and change the value of the <language /> element to the language you wish to add.

    <ac:language>English</ac:language>

  6. Restart IIS, shut down CompositeAdmin COM+ package
    Restart the IIS process and shut down the “CompositeAdmin” COM+ package to ensure that your configuration change have not been cached.

  7. Disable Language XML caching
    The language XML files will normally only be loaded once and will then be kept in memory, but since you will be editing these files you should disable the language XML caching.
    You do so by executing the following steps:
    - Start the “Component Services” application from Administrative tools
    - Locate the COM+ package CompositeAdminLib
    - Locate the component “CompositeLocalization.StringProxy” in this package and edit the properties
    - On the Activation tab, remove the “Enable object pooling” check box and save

Start editing

You should now be set to edit the XML files located in

<Composite Root>\Localization

For each <ss:String /> element in these file, you should add a sub element pertaining to the language you wish to add, like

<ss:Swedish>Text here</ss:Swedish>

You might have received a pre-edited version of the files from Composite, where there have been made room for your language. If so, delete the original XML files (do not delete the .xsd file in the same folder) and copy the files you received into the folder.

You can use applications like “XML Spy” to edit the XML files.

Don’t worry about “breaking” the strings of other languages – when you send the language XML to Composite we will only add your new language to our source base.

Special characters and “tokens”

Please note that some string contain “control elements” and “tokens” – see examples below. You should typically NOT translate these, since they have a special meaning to the system:

Examples of “control elements” that you should leave “as is”
\n
#MEDIANAME#
#MEDIACOUNT#

A few strings are enclosed in CDATA tags. You should keep the same structure in your work.

Testing your changes

As you add strings to the new language, you should be able to see the changes in the administrative module right away – just save the XML file and refresh (F5 for the whole window, or right-click Reload for a single page).

Some strings are only shown when arcane errors occur, and are near impossible to “test” – just make sure that the string you added looks correct.

XML parse errors

If problems occur while loading the Language XML files, Composite will write an entry in the event log – you should ensure that the files are correctly formatted (that they are “valid XML”) and that they fit the schema.

My modules


© 2008 Composite A/S, Danmark
Tlf: +45 39 15 76 00 | info@composite.net
Composite A/S er Microsoft Certified Partner
Composite CMS overholder standarden for valid CSS
Composite CMS overholder standarden for valid XHTML 1.0
Printet fra http://www.composite.net/composite-1527.htm
Findes på denne sti: Composite Developer | 3.x technologies | Configuration | Adding a new language