/
Chat Layout UI: Text and Document Translation (BETA)

Chat Layout UI: Text and Document Translation (BETA)

Please note: This feature is still in beta.

Introduction

The Translation Interface brings a familiar, intuitive experience to users by mimicking the layout and functionality of common translation tools available on the internet.

This feature is designed to optimize translation workflows by providing a focused, single-interaction interface. Unlike the original Chat Interface, which supports extended conversations with multiple messages exchanged between the user and the Assistant, the Translation Interface is purpose-built for one-to-one interactions. Each translation request generates a new chat session, ensuring clarity and efficiency in every interaction.

Another key difference from the Chat Interface is the delivery of responses. Instead of streaming responses incrementally, the Translation Interface delivers the entire translated output synchronously, providing a stable and predictable experience.

This interface is ideal for users who need to perform frequent text translations as part of their daily tasks. Additionally, we support the translation of documents, making it a versatile tool for handling various translation needs efficiently.

Getting Started

Creating the AI Module Template

In order to be able to use the new translation module called TranslatorV2, an AI Module Template needs to be created.

Note: If this AI Module Template already exists, you can skip the next 7 steps and continue with the Enabling the Interface section.

  1. Make sure you have the admin.space.write role assigned

  2. Go to /admin/ai-modules

  3. Click on “New AI Module”

  4. For “AI Module Name”, enter “Translator V2” (for example, this name will be later displayed on the space page when selecting an AI Assistant)

  5. For “Reference in code” select “TranslatorV2” from the dropdown

  6. For “Configuration” copy the code from the Configuration section of this page → Translator V2 | Configuration

  7. Save AI Module Template

Enabling the Interface

  1. Visit the Space Management feature (/admin/space).

  2. Select an existing Space or create a new Space.

  3. In the “AI Assistant” section, select the “Translator V2” module (the one created/mentioned in the previous section). Selecting this module will automatically configure the Space to display the Translation Interface.

  4. Text translation is the default mode, but to also translate documents, please enable “Upload in Chat”.

 

Screenshot 2025-01-07 at 09.47.17.png
Selecting Translator V2 will automatically display the text translation interface

 

Screenshot 2025-01-07 at 09.47.22.png
If enabled, the translation interface will also show the Document translation feature

For more info on space management: Space Management Interface

The “Translator V2” module is standalone and can not be combined with other modules.

Switching Between Interfaces

  1. Visit the Space Management feature (/admin/space).

  2. Select an existing Space or create a new Space.

  3. In the “Advanced Settings” section, click the pencil icon button.

  4. The userInterface property should be “CHAT”. Update it to “TRANSLATION”.

The following setting will show the translation interface:

"userInterface": "TRANSLATION"

The following setting will show the chat interface:

"userInterface": "CHAT"

Define Custom Translation Languages

You can specify which languages should be available for translation. For detailed instructions, please visit: Space Management Interface | Advanced Settings.

After saving the space, only the specified languages will be visible in the translation UI.

Adjusting module configuration

More details on configuring the module configuration, e.g. glossary or allowed input languages, can be found here: Document Translator Service

Feature Overview

Interface Layout

Text translation UI

  • The input field is on the left for the source text, and the output box is on the right for the translated text.

  • A dropdown selection is available above the output box to specify the language into which the text should be translated.

Document translation UI

  • When “Upload in Chat” is enabled in the translation space, the interface displays two tabs at the top of the page, allowing the user to choose between text and document translation.

  • When switching to the "Document” tab, the user can upload a file in an allowed format. After the file is processed, the user can select the output language and initiate the translation process, which typically takes around 2 minutes. Once the translation is complete, the file will be available for download in the selected output language.

 

 

 

 

 

 

Key Functionalities

  • Automatic language detection. There is no need to specify the language of the text to be translated.

  • Customizable pre and post-processing: The text can be pre-processed with a pre-defined glossary to have a consistent translation of your choice of words in the target language. Similarly, the text post translation can also be customized (eg. to convert from American to British spellings).

How to Use (End-User)

Prerequisite

  • You are a member of Space which has the userInterface setting configured to “Translation”.

Steps

Text translation

  1. Enter the text to be translated in the left column input box.

  2. Select the language you want to translate the text to.

  3. Click on the “Translate to [language]” button.

  4. View the translated text on the right column output box.

Document Translation

  1. Switch to Document tab in translation interface

  2. Upload document to be translated

  3. When upload is done, choose output language

  4. Click on the “Translate to [language]” button

  5. Wait until document translation finished and translated file shows

  6. Download translated file

Supported file types for document translation

By default, the document translation feature allows uploading .docx and .xlsx files. However, if you want to restrict the file types to only .docx or only .xlsx, you can use the FILE_TYPES_DOCUMENT_TRANSLATOR environment variable located in the next-chat frontend application.

Example how to set:

FILE_TYPES_DOCUMENT_TRANSLATOR: 'docx'

This will only allow the upload of docx files in the document translation interface for example

Known Issues & Limitations

As this feature is still in beta, there are a few issues that need to be resolved:

  • File Type Limitation: Currently, only .xlsx and .docx files can be uploaded. Support for additional file types is planned for the future.

 


Author

@Thea Kitzinger

 

© 2025 Unique AG. All rights reserved. Privacy PolicyTerms of Service