---
title: "Overview"
description: "Translate Kirby pages, files, and site content from PHP – the same pipeline the Panel uses, exposed as a public API."
canonical_url: "https://kirby.tools/docs/content-translator/php-classes"
---

# Overview

> Translate Kirby pages, files, and site content from PHP – the same pipeline the Panel uses, exposed as a public API.

Use the API from CLI commands, hooks, custom controllers, or batch scripts.

## Components

<card-group>
<card icon="i-ri-translate" title="Translator" to="/docs/content-translator/php-classes/translator">

The entry point. Build one for any model, then copy or translate content with a single method call.

</card>

<card icon="i-ri-plug-line" title="Strategies" to="/docs/content-translator/php-classes/strategies">

Pluggable translation backends. Built-in: DeepL, Copilot AI, callable. Implement `Strategy` to plug in any service.

</card>
</card-group>

## Global Helpers

```php
// Build a Translator for any model
$translator = translator($page);

// Translate a single string with the configured strategy
echo translate('Hello', 'de', 'en');
```

Equivalent without the helpers:

```php
use JohannSchopplich\ContentTranslator\Translator;

$translator = new Translator($page);
echo Translator::translateText('Hello', 'de', 'en');
```

<callout color="info" icon="i-ri-arrow-right-line" to="/docs/content-translator/php-classes/translator">

Continue with the **Translator** reference for the full method list.

</callout>

---

Every page of this site as Markdown: <https://kirby.tools/sitemap.md>
