Menu

Making a "Branded" Distribution of OmegaT Log in to Edit

Aaron Madlon-Kay

OmegaT has some extension points to facilitate creating a "branded" distribution. This document describes these extension points and how to use them.

A branded distribution is a version of OmegaT customized for some purpose, usually for use by a particular organization. By default it differs from the "stock" OmegaT distribution in the following ways:

  1. It identifies itself as "OmegaT BRAND" in the UI and in application ID strings such as those saved to TMX files
  2. It may have different default preferences
  3. It may have different UI layout defaults
  4. The preferences and UI layout files that it reads and writes are separate from those used by "stock" OmegaT
  5. It may be bundled with spelling dictionaries

Branding token

The branding token is used to distinguish branded OmegaT from "stock" distribution. It is the BRANDING String constant defined in OStrings.java. Set this to e.g. the name of your organization.

Setting the BRANDING constant will alter the OmegaT application name displayed in (most places in) the UI, as well as the application ID saved to TMX files.

The branding token is also used in the file names for preferences and UI layout. If BRANDING is set to Example then

  1. Preferences will be stored in omegat-Example.prefs
  2. UI layout will be stored in uiLayout-Example.xml

This is true both for local user preferences (in the "configuration folder") and project-specific preferences. In other words, branded OmegaT will not honor project-specific UI layout files.

Default preferences

OmegaT can load first-run default preferences from a preferences file provided in the "installation folder", which is the folder where OmegaT.jar lives. One way to include such a file in the build is:

  1. Place the custom defaults into /release. Note that if BRANDING is Example then the prefs file must be named omegat-Example.prefs.
  2. Add the following block to the main distribution's contents block in build.gradle:
distributions {
    main {
        contents {
        
            from('release') {
                // Optional bundled defaults
                include '*.prefs'
            }
        
    }
}

Default UI layout

The easiest way to include a customized default UI layout is to overwrite the standard defaults in DockingDefaults.xml.

Bundling spellchecking dictionaries

Additional spellchecking dictionaries can be bundled by including e.g. xx_YY.zip in /src/org/omegat/core/spellchecker.


Related

Wiki: Home