Site Manager Developer Manual / Version 2204
Table Of Contents
For localization of texts and names and custom icons shown in the Site Manager
defined in the CoreMedia
Server, a file following the naming scheme name[_<locale>].properties can be
used. It can be located in either class path or a JAR file located in the lib/
directory.
Example for the naming:
German: com/customer/cap/editor.properties
English: com/customer/cap/editor_en.properties
French: com/customer/cap/editor_fr.properties
The Bundle name com/customer/cap/editor
is configured with the Bundle element of the
editor-startup.xml
.
<Bundle name="com/customer/cap/editor"/>
Within the files, name/value pairs define the localized names. For each object a name and a tooltip text can be configured. The naming scheme is as follows:
<Name of the object defined in the CoreMedia Server>[/<Name of the property>]Label
or
<Name of the object>[/<Name of the property>]ToolTip.
The value is the localized name.
If you want to change the embedded labels of the Site Manager (for
example a menu item or the label of a button) you need to know the keys of these labels. You will find the keys
in the file hox/corem/editor/toolkit/property/property_de.properties
which is located in the
cap-editor-resources.jar
file of an editor installation.
Example:
To localize some German names for use in English language, create a file
$COREM_HOME/classes/com/customer/cap/editor_en.properties
. In order to rename a document type
called Bild
to Image
, define:
BildLabel=Image
To rename the property Piktogramm
to Thumbnail
and to add a tooltip saying "Preview
Image" define:
Bild/PiktogrammLabel=Thumbnail
Bild/PiktogrammToolTip=Preview Image
It can be seen that properties are designated via the preceding document type name and are separated by a slash. Therefore, the names of document types must not contain slashes for proper localization of properties. This file can be stored in a JAR file to make distribution easier.
Adding or Changing Document Type Icons
Out-of-the-box the Site Manager comes with only a few icons for predefined
document types (Query, document...). In order to improve the usability of your customized editor, you should add
own document type icons. The editor supports icon sizes of 16x16 and 32x32 pixels that are used in different
views. The icons can be in GIF and PNG file formats. You have to add the images to your custom
properties
file using the keys <doctypename>Image
for 16x16 icons and
<doctypename>TitleImage
for 32x32 images. In order to make the icons available, proceed as
follows:
Store your icons in a directory, for example
com/customer/cap/icons
Add the icon names to your property file using the keys described above.
Pack these directories in a JAR file and put this file into the
lib/
directory of your editor installation.Add the name of the bundle to the
editor-startup.xml
file.
That's it. The editor will automatically use your new icons.
Example:
You already have an editor.properties
file with some customizations of the editor. The file is
stored in com/custom/cap
and therefore the entry in editor-startup.xml
is:
<Bundle name="com/custom/cap/editor"/>
Now you want to add new icons for the Query document and your custom Teaser document. Store the images
Query.png
, QueryLarge.png
, Teaser.png
and TeaserLarge.png
in
the com/custom/cap/icons
directory and add the following lines to the
editor.properties
file:
QueryImage=/com/custom/cap/icons/Query.png QueryTitleImage=/com/custom/cap/icons/QueryLarge.png TeaserImage=/com/custom/cap/icons/Teaser.png TeaserTitleImage=/com/custom/cap/icons/TeaserLarge.png
At last, you create a JAR file from the files and put it into the lib/
directory of your editor.