PHPackages                             tobimori/kirby-trawl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. tobimori/kirby-trawl

ActiveKirby-plugin[Localization &amp; i18n](/categories/localization)

tobimori/kirby-trawl
====================

Automatic translation extraction for Kirby CMS

1.1.0(4mo ago)61.7k↓78.7%MITPHPPHP &gt;=8.0CI passing

Since Jun 3Pushed 4mo agoCompare

[ Source](https://github.com/tobimori/kirby-trawl)[ Packagist](https://packagist.org/packages/tobimori/kirby-trawl)[ RSS](/packages/tobimori-kirby-trawl/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (3)Dependencies (7)Versions (4)Used By (0)

Kirby Trawl
===========

[](#kirby-trawl)

Trawl is an experimental Kirby plugin for extracting translation strings from Kirby templates and content files.

It's made to be combined with an AI localization tool like [Lingo.dev](https://lingo.dev/en) to automate the process of translating your blueprints and templates.

You can find an example implementation of Trawl + Lingo using GitHub Actions CI/CD in the [Baukasten](https://github.com/tobimori/kirby-baukasten) repository.

Setup Guide
-----------

[](#setup-guide)

### 1. Install Kirby CLI

[](#1-install-kirby-cli)

```
composer global require getkirby/cli
```

Add composer bin directory to your shell profile:

```
# Find your global composer directory
composer -n config --global home

# Add to ~/.bash_profile (macOS) or ~/.bashrc (Linux)
export PATH=~/.composer/vendor/bin:$PATH
```

Verify installation:

```
kirby
```

### 2. Install Plugin

[](#2-install-plugin)

```
composer require tobimori/kirby-trawl
```

### 3. Configure

[](#3-configure)

Add to your `config.php`:

```
return [
  'tobimori.trawl' => [
    'sourceLanguage' => 'en',        // Source language for extraction (leave empty to output just keys)
    'languages' => ['de', 'en']      // Languages to validate
  ],
];
```

These config options serve as defaults for the CLI commands. You can override them with command flags when needed. For example, if `sourceLanguage` is empty, the extract command will output translation keys without values.

### 4. Update Language Files

[](#4-update-language-files)

Load translations from JSON files in your language files:

```
