> For the complete documentation index, see [llms.txt](https://docs.vntranslator.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vntranslator.com/features/translation/pre-translation.md).

# Pre-translation

Configure text processing rules applied before sending text to the translation engine.

### Allow line breaks

Preserves line breaks in the original text. By default, all line breaks are removed before translation.

### Trim & normalize spaces

Removes leading and trailing whitespace from text before translation.

### Exclude strings

Excludes specific strings from translation. When text matches exactly, it will not be translated. However, sentences containing these strings will still be translated.

<figure><img src="/files/bk3MfyXyNAVNMHqMUKKU" alt=""><figcaption></figcaption></figure>

**Example**

Exclude Strings: `"Sunny, Summer, Dark Lord"`

<table><thead><tr><th width="200.20001220703125">Original Text</th><th>Translation Behavior</th></tr></thead><tbody><tr><td>Summer</td><td>❌ Will not be translated (exact match)</td></tr><tr><td>Where are you, Summer?</td><td>✅ Will be translated (part of sentence)</td></tr><tr><td>Hi, Summer</td><td>✅ Will be translated (part of sentence)</td></tr></tbody></table>

{% hint style="info" %}
To prevent specific terms from being translated within sentences, use the [**Translation Glossary**](/features/translation/glossary.md) feature with **"Define Variables"** mode
{% endhint %}

### Regular expression (RegExp)

Applies custom regular expression patterns to filter or modify text before translation.

**Learn more:** [RegExp Guide](/advanced/regexp.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.vntranslator.com/features/translation/pre-translation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
