01PWEImplemented

PWE Multilang

A bespoke WordPress plugin which, rather than creating multiple forms, introduced shared forms with a dynamic translation layer — across an environment of around 220 websites and 14 languages.

My role
Concept, architecture, the vast majority of the PHP code, integrations, development and maintenance
Context
PWE · flagship project
Technologies
PHP · WordPress · Gravity Forms · WPML · MJML · WordPress hooks and APIs
~220WordPress websitesthe environment in which the system operates
14languageslocalisation scale
20 → 10forms per websitecompared with the PL/EN model
~180working days per yearauthor’s estimate

In a nutshell

  1. Problem

    A typical trade fair website had around 20 Gravity Forms forms: 10 functional types in Polish and English. Expanding to 14 languages in this model would hypothetically mean 140 separate variants, and the annual reconfiguration of forms, messages and pages required a great deal of repetitive work.

  2. Solution

    Shared functional forms and a dynamic translation layer dependent on the active language in WPML: labels, form fields, messages and notifications. In addition, processes for synchronisation, configuration preparation and reset for subsequent editions, difference detection and protection of manually made changes.

  3. Outcome

    Around 10 forms per website instead of 20, consistent implementation of changes and a lower risk of discrepancies between languages. The author’s estimate: around 180 days’ work by a single developer per year saved through the automation of form and page preparation.

Background

In the trade fair sector, many tasks are repeated with every edition of an event: preparing web pages, forms, content and notifications. PWE Multilang addresses two interrelated issues — expanding multilingual capabilities and reducing the cost of maintaining recurring trade fair processes.

The scale of the problem

Every event website requires sub-pages, registration and contact forms, and correspondence tailored to different groups of participants — and each new edition of the trade fair necessitates the re-creation or updating of these elements. With multiple websites, even a change taking just a few minutes becomes a significant maintenance cost.

Previously, the system was based on two independent language variants: Polish and English. With ten types of forms, this resulted in around twenty Gravity Forms objects per typical website. Extending this model to 14 languages would mean up to 140 variants per website (10 types × 14 languages) — this is a hypothetical scenario illustrating the scale, not the actual number of forms that existed.

The project therefore had two distinct objectives: to make the forms available in more languages and to make routine maintenance independent of manually editing tens or hundreds of objects.

The solution

This is a custom WordPress plugin that integrates Gravity Forms with WPML. Instead of a separate form for each language — shared functional forms and a dynamic translation layer.

  • Multilingual Gravity Forms that depend on the active WPML language.
  • Translated form content, messages and notification settings.
  • Automatic creation, synchronisation and preparation of forms and page elements for subsequent editions of the trade fair.
  • Standardised templates and fewer separately maintained variants.
  • Detection of differences and prevention of manual changes being overwritten.
  • A modular division of logic, which allowed some functions to be separated into the PWE System.

Form templates and synchronisation

The plugin features a set of templates corresponding to business tasks — including registration, contact forms, exhibitor recruitment, visitor registration and badge management. Template components build definitions for fields, confirmations, notifications and settings, and then compare them with what already exists in Gravity Forms.

Creating a form is not simply a matter of a single API call. It involves identifying an existing object, preparing the data, determining field IDs and merge tags, comparing differences, and deciding whether and what can be safely changed. The same mechanism applies when creating a new event and when preparing the next edition.

Multilingual pages and notifications

The system recognises the languages configured in WPML and creates missing page versions based on data and rules: it selects slugs, copies metadata and links translations. Pages are a separate synchronisation process, not a by-product of form creation.

Form users receive confirmations and notifications in their own language. Message templates are created in MJML, and a shared library of translation variables ensures that changing a single variable can affect multiple instances — thereby maintaining content consistency.

Technical mechanisms

The code is split into independent areas: forms, their translations, pages, notifications, synchronisation and tools. The multilingual logic works at every stage of a form’s life — from display, through validation, to submission. Synchronisation runs are protected against running in parallel and can safely retry, and notifications use shared MJML templates.

Form localisation workflow

At every stage the mechanism detects the visitor’s language, checks whether the form has a translation and matches texts to fields by stable identifiers rather than their order — rearranging fields does not break the translations.

  • Labels, placeholders, descriptions, checkbox labels, text content, options and the submit button text are all translated.
  • The form’s logic remains consistent across all languages.
  • Translations also work during revalidation and submission, when Gravity Forms once again operates on the field definitions.

The structure of the registration process is separated from the language layer — rather than synchronising a dozen or so almost identical forms, a single model and its translations are updated.

Secure synchronisation

Synchronisation follows a fixed order — languages first, then pages, and forms last. Each stage returns a result to the report, and a failed stage halts the following ones.

  • If the input data is incomplete or incorrect, the process ends without any changes — a faulty configuration cannot ‘wipe’ the site.
  • Two synchronisations cannot run on the same site at the same time.
  • Manually modified forms are recognised, and overwriting requires an explicit decision — automation does not overwrite deliberate corrections made by administrators.
  • A forced resynchronisation mode is available, and a report can be sent to the administrator by email.

Results in figures

  • ~220 websites — the environment in which the system operates.
  • 14 languages supported dynamically.
  • 20 → 10 — from around 20 PL/EN variants to around 10 functional forms per typical page.
  • ~180 working days per year — the author’s estimate for the automation of the annual preparation of forms and pages; not the result of an official measurement.

In addition to saving time, this reduces the risk of discrepancies between form copies, shortens the time taken to implement updates and lowers the cost of maintaining messages.

Scope of work

Concept, system design, the vast majority of the PHP code, integrations, development and maintenance. The core code was written independently, without the use of AI.

The real value goes beyond simply having fewer forms: it means fewer manual operations, consistent implementation of changes, and developers’ time freed up for other tasks.