Customize existing language package

Overview

WordFrame Integra is a uni-language system. One application can use only one language to translate its resources. Having one Integra page translated in many languages is not supported, and multilingual sites are implemented as a number of localized sites, but each of this sites is uni-language.

If you want to localize the WordFrame Integra platform or one of its components, you will have to create a Language package dedicated to the target language. Contrary to the UI and webframe packages, the creation of a new language package almost always is a customization of already existing one. This is required as the language pack is tightly integrated with the application it supports. The language resource keys from the language XML file should correspond to the ones used during the applications development. So the only thing we could change is to customize the values for each key.

Because of the above reasons, one application is tightly integrated to one language file, which translates its language keys.

These keys are later used by two functional tags substituted during the page render process: {{translate: key}} and {{snippet: key}}. The difference between the two is just whether they are substituted in textareas or not (the HTML editor is also considered as a textarea)

To customize a language package, you need to:

1. Download the original language package

browse software packs
  1. Log in to the WordFrame Integra Core Administration
  2. Click on the "Architect" tab in the upper left corner
  3. Click on the "Software management" menu in the main navigation bar
  4. Click on the "Customize packages" link in the "Software packages" section on the left of the screen
  5. Click on the Language tab
  6. Click on the "download" link of the package you need to customize
  7. If the package is not in this list, you need to install it first

2. Extract the package contents

You can extract the package contents by using a simple unzip program. You need to additionally extract the repository.zip file to access the actual language_pack.xml file.

The standard folder structure of the Language packages look like this:

  • wfpack.info (the xml file with the pack meta details)
  • wfpack.signature (the pack integrity signature and vendor public key)
  • repository (the pack contents stored as .zip archive in the pack)
    • language_pack.xml (the language resource keys and values)

More about the wfpack.* files you can learn on this page

The repository folder will be compressed by the packaging tool to a zip archive in order to comply with the general software package requirements

3. language_pack.xml

This is the file that holds the list of the language keys and their corresponding translations. If a translate enabled language resource is not found in the applied language package, the system will still present the text of the key which value is missing. An example of the file contents is provided bellow:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <resource>
	<key> <![CDATA[followed_by_username_is_required]]> </key>
	<value> <![CDATA[The field "Followed by username" is required]]> </value>
    </resource>
</root>

4. Apply the needed changes to the language_pack.xml file

The language file consists of the description of many language resources, but they all have three elements:

  • key - the string that should be matched and replaced with its value by the translation functional tag
  • value - the value that should be presented to the page viewer
  • description - some notes visible only by the language file developers and maintainers

Customizing a language file means changing the values of a selected key.

5. Build the new package

To build the newly customized language package and sign it for distribution you need to use the Wordframe Integra packaging tool. The specifics in the language package type is that you have only one file in the repository folder - the language_pack.xml.