Translate a Segment with AI

Swordfish supports the use of AI for translating segments directly using Machine Translation engines such as ChatGPT or Claude. It also generates prompts tailored to work with any AI engine.

See the Machine Translation chapter for an explanation of how to use ChatGPT, Mistral or Antyhropics' Claude as traditional Machine Translation engines.

Prompt Generation

Swordfish generates detailed prompts for AI systems that are designed to produce XLIFF <target> elements that can then be inserted into a segment during translation.
Note
Note
If segment terms have been retrieved from a glossary, those terms are automatically included in the prompt to improve the results generated by the AI systems.
Translating a segment with AI involves these steps:
  1. Generate a prompt and copy it to the clipboard.
  2. Execute the prompt in an AI system and copy the response to the clipboard.
  3. Insert the response from the clipboard into the segment.
There are two options for generating an AI prompt:
  • Generate a prompt and copy it automatically to the clipboard.
  • Generate a prompt and open a dialog to allow editing the generated text.
Follow these steps to generate a prompt and copy it automatically to the clipboard:
  1. Select a segment in the Translation Panel.
  2. Select AICopy AI Prompt to Clipboard ([Ctrl+Shift+C] on Windows/Linux, [Cmd+Shift+C] on macOS) from the main menu.
Follow these steps to open a dialog for editing the prompt:
  1. Select a segment in the Translation Panel.
  2. Select AIOpen AI Prompt Dialog ([Ctrl+Shift+P] on Windows/Linux, [Cmd+Shift+P] on macOS) from the main menu.
    The AI Prompt dialog appears:
    AI Prompt Dialog
  3. Review and edit the prompt text if necessary.
  4. Click the Copy Prompt to Clipboard button.

Executing the Prompt

After you have copied the prompt to the clipboard, open an AI tool for running the query.
Note
Note
Prompts generated by Swordfish have been tested and are known to work on these AI systems:
Paste the content of the clipboard into the AI question box and submit the request.
If necessary, scroll through the app content page and look for the answer. As the answer is expected to be in the form of properly formatted XML, it is usually displayed in a special box that includes a Copy button.
Example Response from Microsoft Copilot
Finally, copy the AI response to the clipboard.