Download the PHP package studionoir/translingua without Composer

On this page you can find all versions of the php package studionoir/translingua. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package translingua

Translingua

Static translations for templates and plugins, plus AI translation of real content — for Craft CMS 5.

Requirements · Installation · Editions · Configuration · Console commands · How it works


Craft gives you multi-site content but leaves you to translate it. Translingua covers both halves of that job: the static strings baked into your templates and your plugins, and the actual content sitting in entries, categories, globals and Formie forms.

Nothing inside vendor/ is ever modified, and no content is saved without you pressing Save.

Requirements

Craft CMS 5.0 or later
PHP 8.2 or later
Optional Formie 3.x for the Formie integration
Plus only A DeepL, OpenAI, Anthropic or Google Gemini API key

Installation

From your project root:

Or install it from the Plugin Store in the control panel.

Editions

Standard is free and covers static translations. Plus adds everything AI. The edition handles are standard and plus, in that order — Craft reads the list as least to most feature-rich, and the Plugin Store listing has to use the same two handles, or installing and switching land on the wrong edition.

Plus is normally activated through the Plugin Store. On a local or path-repository install you can switch editions from the command line:

Editions live in project config, so switching needs allowAdminChanges on for that environment.


Standard

Template translations

Translingua scans your templates, modules and local plugins for |t, Craft::t() and Craft.t() calls and lists every string it finds, grouped by translation category, so you can translate them per site language.

The scan is cached against the modification times of the files it read, so an unchanged project never pays for a rescan. A Rescan templates button forces one when you want it.

Plugin translations

Every enabled plugin that ships language files appears automatically — CKEditor, Formie, Knock Knock, Embedded Assets, Craft's own control panel strings, whatever you have installed. A plugin shows up only once it is actually installed, and disappears again if you remove it.

Strings a plugin already translates are shown pre-filled and marked default. Edit one and it becomes a project override; leave it and nothing is written.

Where translations are stored

Everything is written to:

Craft registers each plugin's message source with overrides enabled, so those files transparently win over the plugin's own. Your translations are plain PHP files in your own repository — they survive composer update, they diff cleanly, and they deploy like any other code.

Working with large sets

Formie alone ships thousands of strings, so the editor gives you search, a missing / translated filter, and pagination. Strings with meaningful leading or trailing whitespace are outlined so you can see them.

You can also add strings that don't exist yet, for copy you're about to write.


Plus

AI providers

DeepL, OpenAI, Anthropic (Claude) or Google Gemini, with your own key. Keys support environment variables, so nothing secret needs to be committed:

The buttons only appear once a real request to the provider has succeeded — a key that is wrong, expired or out of quota simply means no buttons, rather than failures at the moment you try to use them.

Identical strings are cached for a month, so re-running a batch costs nothing for anything already translated.

A translate button on every field

Every text input in the control panel gets one: plain text, textareas, CKEditor, and anything any other plugin renders — the buttons work by reading the DOM, not by knowing about specific field types, which is why they turn up inside Formie and SEOmatic without either plugin being involved.

No languages to pick. The target is always the site you are editing, taken from the site switcher. The source is detected by the provider from the text itself. Each button states the direction it will run in — AUTO → EN, or NL → EN if you override the source from the button's menu.

Nothing is saved for you: the translation lands in the input and you press Save.

Some things are never sent to the provider, whatever the field is called: URLs, paths, email addresses, phone numbers, bare numbers, and Craft's own revision notes. Link fields are a special case — only the Label is copy, and a link pointing at an email address or phone number is left alone entirely, since that label is nearly always the address itself.

A "Translate page" button

Sits next to Save and runs over every field on the page at once.

It appears only where the page is content — entry, category and global set edit screens, plus SEOmatic's Global SEO and Content SEO. On a settings screen "translate everything" would rewrite configuration, so it is not offered there.

Switching Translingua off per source

Sections, category groups and global sets each carry a Translingua toggle on their own settings screen, beside Craft's other switches. Turn it off and that source is left alone entirely: no translate buttons on its entries, no page button, and it stops appearing as a choice in AI translations.

The toggle is a Plus control, so it only appears on Plus installs — on Standard there would be nothing for it to switch.

Batch translations

Translate entries, categories and global sets from one site into any number of others, on the queue. Pick exactly which fields to run over, including fields nested inside Matrix blocks.

Fields whose translation method is none are shown but disabled: Craft stores one value for every site, so "translating" one would overwrite the source. Set the field to translate per site first.

Optionally creates a revision before each element is written, so a batch run can be rolled back from the element's revision menu.

The Formie tab

Formie's form builder gets a Translingua tab, where you can:

Translating rewrites the form in place, because that is where Formie keeps its labels. Duplicate the form first if you want to keep the original.

Translated Never touched
Field label, placeholder, instructions, error message, default value Field handles
Behaviour tab: submission message, error message Option values
CSS classes, input attributes

Handles are the key used by submissions, notifications, integrations and your templates, so they are structurally excluded — not filtered out by name, but never collected in the first place.


Configuration

Settings live at Translingua → Settings, or in config/translingua.php for anything you would rather keep in code:

Setting Default What it does
provider deepl deepl, openai, anthropic or google
apiKey — Supports $ENV_VAR
model per provider Only used by the LLM providers
promptContext — Tone of voice, terms to leave alone, formality
enableFieldButtons true Per-field translate buttons
enablePageButton true The "Translate page" button
pageButtonPaths see settings Screens the page button may appear on
fieldButtonExcludedPaths see settings Screens that get no buttons at all
excludedFieldPatterns handle, slug, … Input names never offered for translation
batchSize 25 Strings per provider request
createRevisions true Revision before each batch write
extraScanPaths — Extra directories to scan for strings

Permissions

Two permissions are registered: Manage static translations and Use AI translations. Plugin settings remain admin-only.

Console commands

Add --inline to run immediately instead of queueing, and --overwrite to replace target content that already exists.

How it works

Static translations are plain PHP files in translations/. Craft's own override mechanism does the rest — the plugin adds an editor, not a runtime.

Field buttons read and write the DOM and nothing else. They never save; that stays your decision, and it is why they work inside plugins the plugin has no knowledge of.

Batch translations pair the source and target versions of an element by field path — including block index and entry type inside Matrix — rather than by position, and refuse to write any value Craft considers shared between sites.

Known limitations

Licence

Proprietary. The Standard edition may be used free of charge; Plus requires a paid licence per Craft install. See LICENSE.md.

Support

Made by Studio Noir


All versions of translingua with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
craftcms/cms Version ^5.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package studionoir/translingua contains the following files

Loading the files please wait ...