Skip to content

Conversation

@Parvati-DeepL
Copy link
Collaborator

added guide for translating between language variants and updated info boxes to point to this guide

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new comprehensive guide for translating between language variants (e.g., en-US to en-GB, pt-PT to pt-BR) and updates existing documentation to reference this guide. The guide covers three methods: the Write/Rephrase endpoint, style rules, and custom instructions, with a practical example demonstrating the conversion of American English to British English.

Key Changes

  • Added a new guide explaining multiple approaches to translate between language variants
  • Updated info boxes in supported-languages.mdx and translate.mdx to point to the new guide
  • Added the new guide to the documentation navigation structure

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
docs/learning-how-tos/examples-and-guides/translating-between-variants.mdx New guide documenting three methods for translating between language variants with a practical curl example
docs/getting-started/supported-languages.mdx Updated info box to reference the new guide instead of only mentioning the /write/rephrase endpoint
api-reference/translate.mdx Updated info box to reference the new guide for variant translation
docs.json Added the new guide to the navigation structure

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…variants.mdx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Member

@JanEbbing JanEbbing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! Please address comments before merging


```bash Example request
curl --location 'https://api.deepl.com/v2/translate' \
--header 'Content-Type: application/x-www-form-urlencoded' \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I'd prefer if we consistently used json encoded requests in docs

## Example: Converting American English to British English

```bash Example request
curl --location 'https://api.deepl.com/v2/translate' \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen this guidance before, but just to double check: Have we confirmed with research that both of these approaches (1) write and 2) translate with custom instructions) are qualitatively good? E.g. the prompts for the custom instruction model seem very short to me, naively (without knowing) I'd expect write to do a better to job here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey! I don't think this has been confirmed with research. write/rephrase was documented previously to be used for this use case instead, but it will consistently rephrase text, and the customizations available in the UI like 'corrections only' mode to prevent this aren't available in the API. so Ming initially suggested custom prompts as a workaround. we tested custom instructions a lot for all trails using these types of prompts and it consistently worked. given that it works and write/rephrase is already up as a suggestion for this publicly, figured it would be fine to include this as well. that said if you want me to start a thread with research about it, I'm happy to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants