Skip to content

Configure Languages and Texts


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

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


Add a New Language

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

  2. Change to the directory additional_languages. If it does not exist yet, create it.

  3. Copy an existing language file from %PROGRAMFILES%\SEAL Systems\seal-operator-ui\public\assets\i18n, such as en.json to a new language file, <language>.json, for example, it.json.

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

  5. Add the new language to the language selection of the already existing languages. For this, create an additional language file for the already existing language <already_existing_language>-diff.json in the directory %PROGRAMFILES%\SEAL Systems\seal-operator-ui\additional_languages, for example, en-diff.json or edit the file if it already exists. Here, add the language key and the text shown in the selection to the Language section. The key has to be the same as in the file name for the new language file, for example, it as key and it.json as file name.

    {
      "Common": {
        "Language": {
          "language_token": "language_selection_text"
        }
      }
    }
    

    Example - multiple languages

    {
      "Common": {
        "Language": {
          "en": "English",
          "de": "Deutsch",
          "fr": "Français",
          "it": "Italiano"
        }
      }
    }
    

    Hint - merge

    The diff files are merged to the language files. Therefore, specify only the differences here. The values in the diff files take priority.

  6. 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,it
              ...
    
  7. Close the user interface.

  8. Restart the service seal-operator-ui

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


Change an Existing Translation

  1. Change to the directory %PROGRAMFILES%\SEAL Systems\seal-operator-ui\additional_languages.

  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, %PROGRAMFILES%\SEAL Systems\seal-operator-ui\public\assets\i18n\<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. Therefore, specify only the differences 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