Skip to main content

WordPress plugin

The easyi18n plugin translates a WordPress site through an easyi18n project. It sends the site's text to the project, you translate and publish in the dashboard, and the plugin serves each published language under its own URL prefix, such as /es/. Posts are not duplicated: one post has one address per language.

The plugin is at version 0.1.0 and is not listed on WordPress.org. You install it by uploading its zip file. Install and connect has the steps.

Requirements​

RequirementWhy
WordPress 6.5 or laterWordPress does not activate the plugin on an older version. 6.5 is the first version that loads the compiled translation files the plugin writes
PHP 8.2 or laterDeclared by the plugin; WordPress refuses to activate it below that
Pretty permalinksLanguage URLs such as /es/ need any permalink structure other than Plain
A writable wp-content/languages/plugins directoryTranslated theme and plugin strings are written there as files
WP-CronEvery exchange with easyi18n runs on a scheduled event, never while a visitor waits
An easyi18n project and one of its API keysThe plugin reads the languages from the project and sends text to it

Two parts of the plugin need a newer WordPress than the plugin itself:

  • Text in blocks outside the post body, in shortcodes and in widget bodies is translated from WordPress 6.8.
  • An [ei] marker that a theme prints without running shortcodes is resolved from WordPress 6.7.

The PHP intl extension is not required.

What gets translated​

easyi18n keeps two kinds of text, and the plugin uses both. Keys and content explains the difference.

Text on the siteKindHow it is chosen
Strings of the theme and of plugins, including the ones their scripts printKeysYou switch on each text domain. See Theme and plugin strings
Menu labels, site title and tagline, term names and descriptions, author biographies, image alt text, widget titles and textKeysCollected with no setting, from what visitors see
Text typed into a header, a footer or another templateKeysAutomatic for blocks; elsewhere you wrap it in [ei]…[/ei]
The body and title of posts, pages and synced patternsContentOne switch, off by default. See Posts and pages
The excerpt, and the SEO title and description written in SEOPressContentTravels with its post
The slug of a post or pageContentDerived from the translated title

Drafts and password-protected posts are never sent.

How a translation reaches the site​

  1. The plugin records the text and sends it to the project: strings as keys, posts as documents.
  2. You translate in the dashboard, with AI or by hand, and review the result.
  3. You publish. For keys that is a version; for posts it is the Content publish panel.
  4. The plugin picks up what was published and serves it under /{language}/.

Steps 1 and 4 run on a scheduled event every 15 minutes. WP-Cron fires on visits, so on a quiet site a pass can run later than that.

Publishing is always a person's action in the dashboard. The plugin can ask easyi18n to translate a post on its own, and it never publishes one.

What stays in WordPress​

  • You keep writing in the WordPress editor. A change made to a document in the easyi18n dashboard is overwritten the next time the post is saved in WordPress.
  • wp-admin stays in the site language. Menus, widgets and settings show and save the text as you typed it.
  • The languages come from the project. To add one, add it in the project's settings and verify the connection again.

Other translation plugins​

Running easyi18n next to Polylang is not supported: both claim the /{lang}/ segment of the URL. A site that used Polylang moves over with one command after Polylang is deactivated.

Deactivate and delete​

Deactivating the plugin keeps everything it stored. The site goes back to its source language, and a URL such as /es/about/ redirects to /about/.

Deleting the plugin from the Plugins screen removes its settings, including the API key, the record of captured strings, the translation files it wrote, the stored translations of posts with their translated slugs, and the language URLs. Nothing is deleted in the easyi18n project.

The record of which document belongs to each post is removed too. If you install the plugin again, rebuild the content map before you switch Translate content back on, or posts can be imported a second time.