CSSCurrent en:Installing and customizing language packages

Aus Cryptshare Documentation
Wechseln zu:Navigation, Suche

About Modification and Creation of Language Packs

You can customize the language resources on your Cryptshare Server to your liking. You can change both the language resources that are shipped together with the Cryptshare Server, as well as create additional language resources yourself in order to present Cryptshare in further languages which are not part of the scope of delivery.

Language Packs and Server Updates
Please note that the update routines for Cryptshare Server may overwrite existing language packs on the server with newer versions. This is always the case when the server version you want to update to includes new features for which additional language resources are required for display.

Cryptshare performs an automatic backup of the previous version of Cryptshare Server before each update. This backup also includes the language packages so that any changes that you have made are not lost when language packs are overwritten during the update. However, they must be manually copied from the backed-up version of the language package and entered into the updated version of the language pack accordingly.

You can find the backups in the sub-folder "backup" of your Cryptshare Server program directory. Open the .zip archive from which you want to restore the language packs and navigate into the folder `system\resources\lang`

Pre-Conditions In general it is sufficient to only include those files into the package, which shall be changed (normally translated). If an element is missing within a language package the corresponding element from the fallback package will be used instead. Apart from that the following conditions must be met:



version.xml Encoding has to be UTF-8 without BOM
All Files Do not contain a language code in the file name
<*.properties> Encoding has to be ISO-8859-1.
<*.html> Encoding has to be UTF-8 without BOM
When not using the encodings listed above this can cause errors in the User Interface and in email notifications.

Therefore it is recommended to use an editor supporting different encodings for editing the files. The Windows editor 'Notepad' does not support a suitable format. Editors supporting additional formats are for example:

Package Descriptor (version.xml)

Language Packages are defined and recognized (when installed) by their respective Descriptor-File (version.xml). The file describes the following details about the package:

  1. Version of the Package
  2. Language, and optionally the Country of the Package (ISO-639-1)
  3. Product-Key for which this package is made

Language Package Version

The version number of a package consist of a Major Version Number and a Minor Version Number: <Major>.<Minor>. The Major-Number describes the compatibility with the product for which the package is made. The Minor-Number is count up for any change that has been made to the package.

The Cryptshare Server v3.10 requires at least a language package of major version 4. An accepted package therefore must at least have version 4.0.
Custom Version Number
In order to know on which language package your custom package is based on you can use the original version number and multiply the major version number by 10: v6.1 --> v60.1

Language Package Product-Key

The new language package management can differentiate between packages made for different Cryptshare Products. This is specifically interesting for the Email Templating-Engine in order to install different notifications on the server for different products. For instance, Cryptshare for Outlook defines two different Email templates for the sender- and recipient notification.

Product-Name Product-Key
Cryptshare Server server
Cryptshare for Outlook client.outlook
Cryptshare for Notes client.notes
Cryptshare Robot client.robot
Cryptshare .NET API api.dotnet
Cryptshare Java API api.java
Click to see the XML Markup for a 'version.xml' file ...
    <value key="vendor" type="string">\[VENDOR\]</value>
    <value key="version" type="string">\[LANG\_VERSION\]</value>
    <value key="locale" type="string">\[LANGUAGE\]</value>
    <value key="product" type="string">\[PRODUCT\]</value>

Click to see an example for a 'version.xml' file ...


   <value key="vendor" type="string">Cryptshare AG</value>
   <value key="version" type="string">4.0</value>
   <value key="locale" type="string">de\_DE</value>
   <value key="product" type="string">client.outlook</value>

Structure of a language package

Cryptshare Server

A regular Cryptshare Server Language Package has the following structure:

Path Content Mandatory
version\_<isocode>.xml Contains meta information about the language package:
  • Package language in form of a ISO-639-1 Code
  • Package Version: Versions not supported will be declined by the Cryptshare Server
  • Product: The product type of the package
administration.properties> Contents for the Administration Interface Only required if a translation of the Administration Interface is desired.
web-app.properties> Contents for the User Interface Only required if a translation of the User Interface is desired.
web-common.properties> Contents used for the User Interface as well as the Administration Interface. If either the Administration or the User Interface is modified, these resources should be modified as well.
system.properties> Contents used also in other parts of the application, e.g. WSDL interface. If other parts of the application are modified, these resources should be modified as well.
mail.properties Contains text snippets for email notifications Yes
templates Contains all email templates required for email notifications Yes, otherwise the defined fallback package is used.

Changes to the structure of the language package (from version 21 to 22)

The structure of the language packages has been simplified with version 22. Instead of several properties files per directory, there is now one property file that replaces the directory. This file then contains all the properties of all the files that were previously in the directory.

The names of some files have been revised. For example, what was previously under "application" has been moved to "web-app.properties" and what was under "common" is now in "web-common.properties". In addition, a new file "system.properties" has been added. Certain properties that are not exclusively used by the user interface but also within the application (e.g. WSDL interface) have been moved here. Thus, there are only directories for the templates. All other properties are available directly via the respective file at the top level.

Directory structure of a Cryptshare Server language package (version 21 and older)
   │   administration
   │       Addon.properties
   │       ...
   │   application
   │       BasePage.properties
   │       ...
   │   common
   │       AbstractDropDown.properties
   │       ...
   │   mail
   │       mail.properties

Directory structure of the current Cryptshare Server language package (version 22 and newer)
   │   administration.properties
   │   mail.properties
   │   system.properties
   │   version.xml
   │   web-app.properties
   │   web-common.properties

Example Property old / new:

Name of property Version 21 Version 22
label.addon.clientID=Client ID Addon.properties in directory administration administration.properties
application.title=Cryptshare BasePage.properties in directory application web-app.properties
mail.heading.archivingFailed=Archiving Failed mail.properties in directory mail mail.properties

Changes to the structure of the templates (from version 21 to 22)

The templates have been revised in such a way that the HTML files only contain outline elements and property keys and all texts are in the respective "conf.properties". This means that when adapting the texts, only one file per template needs to be revised. Markdown can now be used in the texts.

Example downloadSummary message.html (old)

Message old html.png

Example downloadSummary message.html (new)

Message new html.png

The texts are now completely in the conf.properties:

Conf.properties download summary.png

In addition, functions are used in the HTML file to generate HTML from the text if it is written in Markdown.

Function Explanation
$render.eval(text) If the text itself contains variables, then this function is needed to replace the variables with the real values.
$esc.html(text) This function removes certain characters to prevent the resulting HTML from containing elements that an attacker can use to cause damage.
$md.toHtmlInline(text) Generates HTML from the Markdown text. This removes the enclosing paragraph and the last line break, if present.
$md.toHtml(text) Generates HTML from the Markdown text.

Cryptshare for Outlook

Path Content Mandatory
version\_<isocode>.xml Contains meta information about the language package:
  • Package language in form of a ISO-639-1 Code
  • Package Version: Versions not supported will be declined by the Cryptshare Server
  • Product: The product type of the package
lang\_<isocode>.xml Contains resources for the Cryptshare for Outloook User Interface Yes
templates → recipient The email template for the recipient notification when performing a transfer via Cryptshare for Outlook Yes
templates → sent The email template for the email stored in the sent-items folder of Outlook when performing a transfer via Cryptshare for Outlook Yes
templates → sms The email template for the SMS notification when performing a transfer via Cryptshare for Outlook and choosing to send the password via SMS Yes
Directory structure for a Cryptshare for Outlook Language Package