Skip to content

Configure Languages and Texts


For SEAL Operator, you can add a new language or make changes to an existent translation.

Each language configuration is stored in a separate json file in the %PROGRAMFILES%\SEAL Systems\seal-operator-ui\dist\assets\i18n directory. Besides the translation itself, every json file holds a LANGUAGE section where all available languages for the language selector are listed.


Add a New Language

  1. Change to the %PROGRAMFILES%\SEAL Systems\seal-operator-ui\dist\assets\i18n directory.

  2. Copy an existent language file, such as en.json to a new language file, <language>.json, for example, fr.json.

  3. Translate the values of the keys in the new language file, <language>.json.

  4. For the already existing languages the new language needs to be added to the language selection. For this, create an additional language file for the already existing language <already_existing_language>-diff.json, for example, en-diff.json or edit the file if it already exists. Here, add the language token and the text shown in the selection to the LANGUAGEsection. The token has to be the same as in the file name for the new language file, e.g. fr as token and fr.json as file name.

    {
      "Common": {
        "LANGUAGE": {
          "language_token": "language_selection_text"
        }
      }
    }
    

    Example - multiple languages

    {
      "Common": {
        "LANGUAGE": {
          "en": "English",
          "de": "Deutsch",
          "fr": "Français"
        }
      }
    }
    

    Hint - merge

    The diff files are merged to the language files. So only the differences are to be specified here. The values in the diff files take priority.

  5. In the configuration of the seal-operator-ui service, add the new language <language> to the AVAILABLE_LANGUAGES key.

    env:
      service:
        operator-ui:
          tag:
            any:
              AVAILABLE_LANGUAGES: de,en,fr
              ...
    
  6. Close the user interface.

  7. Restart the service seal-operator-ui

    operator service start seal-operator-ui
    
  8. Re-open the user interface.


Change an Existent Translation

  1. Change to the %PROGRAMFILES%\SEAL Systems\seal-operator-ui\dist\assets\i18n directory.

  2. Create an additional language file for the language <language>-diff.json, for example, en-diff.json or edit the file if it already exists.

  3. Copy the section to be changed from the language file, <language>.json to the additional language file, <language>-diff.json and change the value.

    Example - change translation for PLS_PUNCH_TYPE

    {
      "JSON_SCHEMA": {
        "PLS_PUNCH_TYPE": "Punching"
      }
    }
    

    Hint - merge

    The diff files are merged to the language files. So only the differences are to be specified here. The values in the diff files take priority.

  4. Reload the user interface.


Sample Language JSON File

{
  "Common": {
    "Language": {
      "en": "English",
      "de": "Deutsch",
      "fr": "Français"
    },
    "Settings": "Settings FR",
    "Logout": "Logout FR",
    "MyTasks": "My tasks FR",
    "Failed": "Failed FR",
    "Pending": "Pending FR",
    "Success": "Success FR",
    "AddPanel": "Add panel FR",
    "PanelName": "Panel name FR",
    "CurrentFolder": "Current folder: FR",
    "Name": "Name FR",
    "FileType": "File type FR",
    "FileName": "Filename FR",
    "Size": "Size FR",
    "Href": "File href FR",
    "LastUpdate": "Last update FR",
    "NoPanelSelected": "Please select a connector in order to proceed. FR",
    "ServerSettings": "Server Settings FR",
    "RootFolder": "Root folder FR",
    "Search": "Search... FR",
    "FileUpload": {
      "Browse": "Upload FR"
    },
    "Error": {
      "InvalidPanelName": "Invalid panel name FR"
    }
  },
  "Notifications": {
    "ToClipboard": "Copied items to clipboard FR",
    "Creating": "Creating selected items FR",
    "Moving": "Moving selected items FR",
    "Copying": "Copying selected items FR",
    "Created": "Successfully added entry: {{ name }} FR",
    "Deleted": "Successfully deleted: {{ name }} FR",
    "DeletedGeneric": "Items successfully deleted",
    "Moved": "Successfully moved: {{ name }} FR",
    "AddedEntry": "Successfully added entry: {{ name }} FR",
    "AddedEntries": "Successfully added entries FR",
    "AddedItem": "Successfully added item: {{ name }} FR",
    "AddedItems": "Successfully added items FR",
    "Copied": "Successfully copied: {{ name }} FR",
    "CreateError": "Error creating: {{ name }} FR",
    "DeleteError": "Error deleting: {{ name }} FR",
    "DeleteErrorGeneric": "Error deleting items FR",
    "RepoPasteError": "You have to copy repository entries first FR",
    "MoveError": "Error moving: {{ name }} FR",
    "MoveErrorGeneric": "Error moving items FR",
    "CopyError": "Error copying: {{ name }} FR",
    "CopyErrorGeneric": "Error copying items FR"
  },
  "Messages": {
    "DateTime": "Date & time FR",
    "ExportCSV": "Export CSV FR",
    "MarkAsRead": "Click for marking the message as read FR",
    "Search": "Search messages... FR",
    "Source": "Source FR",
    "Title": "Messages FR",
    "Text": "Text FR",
    "Type": {
      "error": "Error FR",
      "info": "Info FR",
      "warning": "Warning FR"
    }
  },
  "Plossys": {
    "Details": "Details FR"
  }
}

Back to top