Skip to main content

Add language tags

Anywhere you define text that users can see, you can use language tags in order to have that text translated for the end user. For example, you can specify a tag name as a target description, or when you create a pre-defined question in the Manage the system (PSA) module. Any time custom text is formatted as a language tag, Bravura Security Fabric will attempt to replace that tag with its counterpart in the associated KVG file.

Tags in <lang>-<locale>-errmsg.kvg cannot be used in JavaScript or TypeScript files. As a result you cannot include these tags in the Angular portion of the skin, or the portions of the Legacy skin that use JavaScript. Tags in <lang>-<locale>-language.kvg can be used everywhere.

To add your own language tags:

  1. Create a custom <lang>-<locale>-language.kvg file in the custom\ directory. This file must include the outer KVGroup:

    # KVGROUP-V1.0
    "language" "<LANGUAGE_LOCALE>" = {
    }
  2. Specify the associations between language tags and their translations by inserting entries into the outer KVGroup, in the following format :

    "_<CUSTOM_TEXT_MACRO>" "" = { 
     "text" = "<text>" 
      }
  3. Save and close the file.

  4. Generate and install the new skin files .

    Warning

    If your new text must include quotes, it is highly recommended that you use single quotes (') rather than double quotes ("). If you must use double quotes, they must be escaped properly.

    For text that appears within an HTML widget, a double quote must be preceded by three backslashes (\\\"). For "normal" text, a double quote must be preceded by a single backslash (\").

    Warning

    You will need to create a new custom KVG file for each language that you intend to translate the custom tag into. Ensure that &lt;lang&gt;-&lt;locale&gt; in the filename and &lt;LANG-LOCALE&gt; in the outer KVGroup are updated according to the respective language, before rebuilding and installing the respective language skin.

Now that you have instructed the Bravura Security Fabric on what to do with these new language tags, you are ready to use them in your instance.

To use the tag, type its name beginning with !!! and containing no spaces. For the example listed above, this would be written as !!!<CUSTOM_TEXT_MACRO> in any location where you want your custom text to appear.