-
Notifications
You must be signed in to change notification settings - Fork 0
Added guide for translating between language variants #217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.mdxandtranslate.mdxto 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.
docs/learning-how-tos/examples-and-guides/translating-between-variants.mdx
Outdated
Show resolved
Hide resolved
…variants.mdx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
JanEbbing
left a comment
There was a problem hiding this 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' \ |
There was a problem hiding this comment.
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' \ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
added guide for translating between language variants and updated info boxes to point to this guide