Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,13 @@
{
"group": "Guides",
"pages": [
"docs/learning-how-tos/examples-and-guides/how-to-use-context-parameter",
"docs/learning-how-tos/examples-and-guides/placeholder-tags",
"docs/learning-how-tos/examples-and-guides/first-things-to-try-with-the-deepl-api",
"docs/learning-how-tos/examples-and-guides/translation-beginners-guide",
"docs/learning-how-tos/examples-and-guides/how-to-use-context-parameter",
"docs/learning-how-tos/examples-and-guides/translating-between-variants",
"docs/learning-how-tos/examples-and-guides/glossaries-in-the-real-world",
"docs/learning-how-tos/examples-and-guides/deepl-mcp-server-how-to-build-and-use-translation-in-llm-applications",
"docs/learning-how-tos/examples-and-guides/translating-between-variants"
"docs/learning-how-tos/examples-and-guides/placeholder-tags",
"docs/learning-how-tos/examples-and-guides/deepl-mcp-server-how-to-build-and-use-translation-in-llm-applications"
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ New user? Follow these quick steps to get started with the DeepL API.

```php Sample request
require_once 'vendor/autoload.php';
use DeepL\Translator;
use DeepL\Client;
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The PHP example now imports DeepL\\Client, but the snippet never uses Client and instead instantiates \\DeepL\\DeepLClient. Please update the import to match the instantiated class (or remove the unused use) so the sample is internally consistent.

Suggested change
use DeepL\Client;

Copilot uses AI. Check for mistakes.

$authKey = "{YOUR_API_KEY}"; // replace with your key
$deeplClient = new \DeepL\DeepLClient($authKey);
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/your-first-api-request.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ We included text translation examples for our [client libraries](/docs/getting-s
<Tab title="PHP">
```php
require_once 'vendor/autoload.php';
use DeepL\Translator;
use DeepL\Client;

$authKey = "f63c02c5-f056-..."; // Replace with your key
$deeplClient = new \DeepL\DeepLClient($authKey);
Comment on lines +107 to 110
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

This snippet imports DeepL\\Client, but then instantiates \\DeepL\\DeepLClient, so the use is unused and the sample is inconsistent. Please either import DeepL\\DeepLClient (and instantiate without a leading \\), or remove the unused import.

Suggested change
use DeepL\Client;
$authKey = "f63c02c5-f056-..."; // Replace with your key
$deeplClient = new \DeepL\DeepLClient($authKey);
use DeepL\DeepLClient;
$authKey = "f63c02c5-f056-..."; // Replace with your key
$deeplClient = new DeepLClient($authKey);

Copilot uses AI. Check for mistakes.
Expand Down
11 changes: 4 additions & 7 deletions docs/learning-how-tos/examples-and-guides.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,21 @@ description: "Learn how to use DeepL API features to achieve your translation g
public: true
---
<CardGroup cols={2}>
<Card title="Mustache placeholder tags" horizontal href="/docs/learning-how-tos/examples-and-guides/placeholder-tags">

</Card>
<Card title="DeepL API 101" horizontal href="/docs/learning-how-tos/examples-and-guides/first-things-to-try-with-the-deepl-api">

</Card>
<Card title="Translation: a beginner's guide" horizontal href="/docs/learning-how-tos/examples-and-guides/translation-beginners-guide">
</Card>
<Card title="Mustache placeholder tags" horizontal href="/docs/learning-how-tos/examples-and-guides/placeholder-tags">
</Card>
<Card title="Glossaries in the real world" horizontal href="/docs/learning-how-tos/examples-and-guides/glossaries-in-the-real-world">

</Card>
<Card title="DeepL MCP Server: How to Build and Use Translation in LLM Applications" horizontal href="/docs/learning-how-tos/examples-and-guides/deepl-mcp-server-how-to-build-and-use-translation-in-llm-applications">

Written by [Akash Joshi](https://thewriting.dev)

</Card>
<Card title="How to Use the Context Parameter Effectively" horizontal href="/docs/learning-how-tos/examples-and-guides/how-to-use-context-parameter">

</Card>
<Card title="How to Translate Between Language Variants" horizontal href="/docs/learning-how-tos/examples-and-guides/translating-between-variants">

</Card>
</CardGroup>
Loading