Translation Cloud for Craft CMS
Craft CMS
Craft plugin: translates HTML responses of site requests (Response::EVENT_AFTER_PREPARE) with a local cache in Craft's cache component, Twig switcher {{ craft.translationCloud.switcher() }}, console command translation-cloud/sync + automatic queue job, signed webhook, env-var friendly settings, hreflang and <html lang>. Language URLs for SEO: /en/… folders (default for new installations) or subdomains with translated slugs, hreflang + canonical per language, 301 from old ?lang= links and language sitemaps (/tc-sitemap.xml); conflicts with the platform's own multilingual URLs are detected (fallback to ?lang=).
Installation steps
- Craft installs plugins with Composer (the control panel has no ZIP upload): unzip the archive into a folder of your project, e.g. plugins/craft-translation-cloud.
- Add a path repository to your project's composer.json: "repositories": [{"type": "path", "url": "plugins/craft-translation-cloud"}], then run composer require coreinfra/craft-translation-cloud.
- Install the plugin: Settings → Plugins → Translation Cloud → Install (or php craft plugin/install translation-cloud).
- Add TC_API_KEY=tc_live_… and TC_WEBHOOK_SECRET=whsec_… to .env; in Settings → Plugins → Translation Cloud keep $TC_API_KEY / $TC_WEBHOOK_SECRET and set the languages.
- In the Translation Cloud panel add a project webhook with the URL https://your-site/translation-cloud/webhook (events translation.completed and translation.updated).
- Add {{ craft.translationCloud.switcher() }} to your layout template; optional cron: php craft translation-cloud/sync (the plugin also queues the sync automatically).
- Language URLs (Settings → Plugins → Translation Cloud): /en/… is the default for new installations, subdomains en.your-site.com or ?lang=en; sites updated from 1.1 keep ?lang= (php craft up). If another Craft site already uses the base URL /en/ (or the host), ?lang= is used and the settings page shows the conflict. Submit https://your-site/tc-sitemap.xml in Google Search Console.