Skip to main content

Install and connect

Connecting a site takes an easyi18n project, one of its API keys and the plugin's zip file. The WordPress card in the project's Settings → Stack has all three. Check the requirements first.

Prepare the project​

  1. Create the project in the dashboard, or pick the one the site will use. Getting started covers a new project. Its source language has to be the language the site is written in.
  2. Add the target languages in the project's Settings → Languages. The plugin reads the list from the project and has no language setting of its own.
  3. Open Settings → Stack. A project created with WordPress as its stack already has a WordPress card. Otherwise, select Add stack, choose WordPress and select Add. Select the card to open it.
  4. Copy the address of the project, @workspace/project-slug, from the card's Project address. The first part is the workspace URL; a workspace without one cannot be found by the plugin, and the card says so in place of the address.
  5. Create the key with the card's New key. The form opens with the label WordPress, the four scopes below and the CI / scripts type already chosen. The dashboard shows the key once; it is also listed under Settings → API keys.

The key needs these scopes. Scopes are checked exactly, so one does not include another.

ScopeWhat the plugin does with it
readVerifies the connection and reads the project's languages; downloads published documents
captureSends the strings of the theme and plugins
writeSends posts and pages. Only when a content type is ticked; see Posts and pages
translateStarts translation runs. Only for Translate Content automatically

Install the plugin​

  1. In the dashboard, open the WordPress card in Settings → Stack and select Download zip. You get easyi18n.zip, the latest published version of the plugin.
  2. In wp-admin, go to Plugins → Add New Plugin → Upload Plugin.
  3. Choose easyi18n.zip and select Install Now, then Activate Plugin.

The admin menu gains an easyi18n entry with four screens: Overview, Sync, Settings and Diagnostics. Only administrators see them.

Activating the plugin from the Plugins screen opens its setup assistant. Activated another way, with WP-CLI or together with other plugins, it opens nothing: select Get started on the Setup card of easyi18n → Overview. On a multisite network the assistant is not available, and the site connects from Settings → Connection.

If the site uses Plain permalinks, wp-admin shows a notice once the site has target languages: language URLs need pretty permalinks. Pick any other structure under Settings → Permalinks.

The setup assistant​

The assistant has five steps: Connect, Languages, What to translate, Browser language & switcher and Review. Each step saves when you move on. Back and Exit setup discard what you changed on the step you are on. A step that offers Skip for now can be left for later. After Exit setup, Resume setup on the Overview screen opens the step where you stopped.

The assistant sends nothing to easyi18n. The first send waits for your confirmation in Sync.

Connect the project​

  1. Enter the project address in Project, as @workspace/project-slug.
  2. Paste the key in API key. The site never shows the key again: once it is saved, the field shows only its last four characters.
  3. Select Save and verify. The button stays off until both fields hold something.

The Connect step of the setup assistant with a project address and a pasted API key

The plugin looks the project up, reads its languages and saves the connection only if that worked. On success it answers "Connection OK: project reachable, base language is en · English", with the project's own source language, and opens Languages.

When it fails, nothing is saved and the message names the cause:

CauseWhat to check
A field is empty, or the project is not in the @workspace/project-slug shapeThe field the message points at
The key does not start with eik_The paste
The API cannot be reached, or does not answer in timeWhether the server can make outgoing HTTPS requests; try again
The key is rejected (401)The key was revoked or belongs to another project
The key lacks the scope (403)The key has no read scope
Workspace or project not found (404)The handle and the slug, and that the workspace URL is set

A success can carry a warning. If content types are ticked in the plugin and the Content dimension is off in the project, the message says that no post will be translated until one of the two changes.

To move the site to another project, enter the new address and its key in this step, or under Change project in Settings → Connection. The plugin asks you to confirm that the site stops serving the translations of the current project, and refuses a project whose source language is not the site's.

Languages​

The step shows the project's Original language and Target languages. They come from the project: add or remove one in easyi18n, with Manage in easyi18n, then select Refresh. Refresh says which target languages it added or removed. A target language reaches visitors only after you publish its translations in easyi18n.

The same card, with its Refresh button, stays on the Overview screen after setup.

What to translate​

The step chooses what the site sends:

  • Under Keys, the theme and the plugins whose text visitors see. The site's own text, such as its title and menus, is always included. See Theme and plugin strings.
  • Under Content, the content types whose published items become documents of the project, and Translate Content automatically. See Posts and pages.

On a new install the step comes with the active theme, its parent theme and every content type ticked. Each content type shows how many published items it has. Every item of a ticked type is a document that counts against the project's allowance, even if you delete it later, so untick the types the site does not need translated.

Saving sends nothing.

Browser language & switcher​

  • Browser language opens the home page in the visitor's language on their first visit. On a new install the step comes with it ticked. Browser language explains when it applies.
  • Show in a menu, on a classic theme, or Show in the header, on a block theme, places the language switcher there. The step names the menu or the header it will use. A classic theme with no menu assigned to a location offers a link to Menus instead.

The position, the display and the labels of the switcher are set later in easyi18n → Settings → Browser language & switcher.

Review​

Review lists the saved value of each step, with an Edit link that opens that step and comes back. Finish and go to Sync ends setup and opens Sync. Finish setup ends it and opens Overview.

The first sync​

Nothing leaves the site until you confirm it. easyi18n → Sync lists, for keys and for content, what waits to be sent, what was sent and what was downloaded.

The Sync screen before the first send, with keys and posts waiting and Confirm this send not ticked

  1. Tick Confirm this send. The help under it says what will be sent.
  2. Leave Send changes automatically ticked, so that background passes send what changes from then on. Unticked, the site sends only when you select Sync now here. Published translations download either way.
  3. Select Sync now. A large site syncs in parts, and the screen runs them one after another until it says "Sync complete." If it stops before, or you closed the tab, select Continue sync.

A theme, plugin or content type you tick after the first send waits in Sync for its own confirmation. What a confirmed source gains later, such as a new page or a new string, is sent without asking again.

From then on the plugin works in background passes, every 15 minutes:

  1. Visitors load pages, and the plugin records the strings of the themes and plugins you chose.
  2. A pass sends the new strings to the project. They appear in the keys editor, where the Captured only filter lists the ones that still lack a translation.
  3. You translate them and publish a version.
  4. A pass notices the new version, downloads each language that changed and writes its translation files. From then on /es/ shows the translated strings.

easyi18n → Diagnostics shows when each pass last ran and what it did. Diagnostics explains the rows.

WP-Cron runs when someone visits the site. If the site gets little traffic, call wp-cron.php from a system cron job so the passes keep their schedule.

Connect from Settings​

easyi18n → Settings has four sections: Connection, What to translate, Browser language & switcher and Advanced. The middle two hold the same choices as the assistant. Every section except Connection has its own Save changes button, which saves only that section.

Before a project is connected, Connection takes the same Project and API key as the assistant and the same Save and verify. Under Connection details, API base URL stays empty unless the site connects to another backend. An empty field uses https://api.easyi18n.com. An address that is not https is refused, because the key travels with every request.

Once connected, Connection shows the project, replaces the key with Update API key, checks it again with Verify connection, and moves the site to another project under Change project.

After connecting​

  • If the assistant did not place the language switcher, add it to a menu, a header or a widget area.
  • Open Tools → Site Health. If it reports "WordPress language packs are missing", install them from the links in that report. Without the pack of a language, dates and other text of WordPress itself stay in English on that language's pages.