Support Log in

Translating Theme Text (String Translation)

User Guide
Prefer video? Watch the Lang Forge tutorials 9 short guides covering every feature Watch

Your website contains much more text than just posts and pages. Buttons, labels, error messages, form placeholders, “Read More” links, “Search results for…” headings, “No products found” notices, copyright text in footers, and dozens of other small text fragments come from your WordPress theme and active plugins. These small pieces of text are called “strings” in the translation world, and they need to be translated separately from your content. If you translate all your pages into Spanish but your theme still says “Read More” instead of “Leer Mas”, your site will feel half-translated and unprofessional.

String translation is a one-time effort for each language that you set up. Once you translate your theme and plugin strings, they stay translated unless you update the theme or install new plugins that introduce new strings. Periodic maintenance — checking for new untranslated strings — keeps everything current.

Understanding where strings come from

Strings come from three sources, and it helps to know the difference so you can prioritize:

SourceExamplesPriority
Your theme“Read More”, “Search Results”, “Leave a Reply”, “Posted on”, “By”, footer copyright textHigh — these appear on every page
Active pluginsWooCommerce: “Add to Cart”, “Proceed to Checkout”. Contact Form 7: “Submit”, “Your message was sent”. Yoast SEO: breadcrumb labelsMedium — visible on pages that use the plugin
WordPress core“Archives”, “Categories”, “Tags”, comment-related stringsLow — most are already translated by WordPress language packs

Step-by-step: Translating strings for a language

  1. Go to Lang Forge → Translations → String Translation in your WordPress admin menu
  2. The page opens with a Domain filter and a Translate to filter at the top, plus an Apply button
  3. Pick a Domain first (your theme text domain or a plugin domain). Strings are grouped by the text domain they come from. “All domains” lists them all together, page by page (25 rows per page by default; the Per page selector changes it). A domain is listed only when it has registered strings, and the AI button works on one domain at a time
  4. Optionally pick a single Translate to language to focus the table on that one column
  5. Click Apply. The table below shows the matching strings
  6. Showing 1 – 25 of N strings — the results counter tells you exactly where you are. The page is paginated (default 25 rows, switchable to 50 / 100 / 200 using the Per page selector at the top right)
  7. When there is more than one page, pagers sit above and below the table. Use Previous / Next or click a page number to jump around
  8. Click into any translation cell, type the translation. The moment you type, a small You have unsaved changes badge appears next to the Save button. Press Save Translations before paginating — switching pages with unsaved edits triggers a browser warning so you don’t lose them accidentally
  9. When the filter returns no rows, the empty state shows the active filter and a Clear filter button, so you can tell “no strings match this filter” apart from “there are no strings at all”

> Good to know: Strings that differ only in letter case or accent, such as “Size” and “size” or “Resume” and “Résumé”, are separate strings: each has its own row and its own translation. On a site that already had its strings table, Lang Forge changes the key of the table once, when an administrator opens an admin page; your strings and translations are kept. On a store with more than 500,000 rows in the strings table it does not do this when a page is opened, and the site works as before until you run wp langforge strings-key --yes from the command line.

AI Translate (PRO)

Instead of translating strings one by one, PRO users can translate the strings of a whole text domain at once, for every site language except the default one — across every paginated page, not just the visible rows:

  1. Pick a specific Domain in the filter and click Apply. Until you do, the screen shows the hint “Pick a domain in the filter to enable bulk AI translate.”, and on a connected site clicking the button only shows “Please select a specific domain first.”
  2. Click the AI Translate button
  3. A window shows the cost in credits first. It offers Translate Missing (it fills only the empty translations) when some are empty, and Re-Translate All (it overwrites the existing ones and ignores Translation Memory) when some are filled. Nothing runs until you click one of them
  4. If you have unsaved edits on the current page, clicking the button asks whether to save them first (the page reloads after AI completes, and unsaved edits would otherwise be lost). Saving does not start the AI run: click the button again afterwards
  5. Click Translate Missing or Re-Translate All to start. The run happens on the server against the full domain: it takes the empty translations (Translate Missing) or all of them (Re-Translate All) for every site language except the default one, and writes the results directly to the database. You do not need to click Save afterwards
  6. After a reload the freshly saved translations appear in the textareas. Paginate through the other pages to review — they’re already saved
  7. Check strings that contain brand names, technical terms, or context-dependent phrases

Without the Lang Forge Pro add-on, the screen has no AI button at all. Next to Save Translations it shows the text “AI translation comes with Lang Forge Pro, a separate plugin.” and a link, “About Lang Forge Pro”.

When do I need to click Save?
ActionSave needed?
Typed into a textarea manuallyYes — the “You have unsaved changes” badge appears, and a browser warning will fire if you try to paginate or close the tab before saving
Clicked AI Translate (then Translate Missing or Re-Translate All)No — translations are written to the database on the server and the page reloads to show them
Mixed (you typed some edits, then clicked AI Translate)The AI button offers to save your manual edits first, because the reload after AI would otherwise discard them

Real-world example: Translating a WooCommerce theme

A content manager is setting up a French version of an online store. She goes to String Translation, selects French in Translate to, and picks the theme’s text domain in the Domain filter first. She translates 45 theme strings including “Add to Cart” (Ajouter au Panier), “Search Products” (Rechercher des Produits), “Sale!” (Solde!), and “Out of Stock” (Rupture de Stock). Then she picks the woocommerce domain, which she has added to String Auto-Registration Domains, and translates 120 plugin strings including checkout labels, cart headers, and account page navigation. With Lang Forge Pro she could click AI Translate for a domain instead and spend her time reviewing the results.

Common mistakes to avoid

  • Ignoring strings after a theme update. When your theme is updated, new strings may appear. Visit the String Translation page periodically and look for rows with empty translation boxes to catch new strings (the screen has no filter for untranslated strings)
  • Translating WordPress core strings manually. Most core WordPress strings are already translated by official language packs. Focus your effort on theme and plugin strings
  • Forgetting context. Some strings are ambiguous out of context. “Post” could mean a blog post or the action of posting something. Check how the string is used on the frontend before translating

> Tip: Translate your theme strings first because they appear on every page — navigation, footer, sidebar, and archive pages. Plugin strings can be translated next, starting with whichever plugins are most visible to your visitors.

> Good to know: If you switch themes, the strings of the new theme are registered as its pages are shown on the front end, as long as its text domain is allowed (by default, the text domain of the active theme). The strings of a new plugin appear only after you add its text domain to String Auto-Registration Domains in Settings. The previously translated strings from your old theme or deactivated plugins are preserved — they simply stop being used on the frontend.

Automatic String Registration

Lang Forge can automatically detect and register theme and plugin strings as they appear on your site’s frontend. This means you do not need to manually register strings — they show up in the String Translation page on their own after a visitor views a page that contains them.

To configure which plugins and themes are auto-registered:

  1. Go to Lang Forge > Languages (Settings page)
  2. Scroll down to String Auto-Registration Domains
  3. Enter the text domains of your theme and any plugins you want to auto-register, one per line. By default, your active theme’s text domain is used
  4. Save settings

After saving, visit pages on the frontend. The strings those pages show from the specified domains are added to String Translation, ready to be translated.

A WooCommerce store has texts that join the list without a page being shown and without a domain on this list: the names of attributes (text domain woocommerce-attributes), the names of the values of global attributes (taxonomy), and the subject, heading, additional content, and footer text of your emails that you typed in the email settings (woocommerce-emails). They are listed when you save them. The Find WooCommerce strings button on the String Translation screen, shown when WooCommerce is active, looks through the shop in small steps and lists the ones saved earlier. A name with square brackets, line breaks, tags, or more than 160 characters is skipped, and the button says how many. If you close the tab, or the connection drops, before the search is done, click the button again: it goes on from where it stopped, says “Continuing the last search from where it stopped.”, and does not count a string twice. A stopped search is kept for one day; the Start over link, shown while one is waiting, searches from the beginning.

> Note: WordPress core strings and Forge Suite plugin strings are never auto-registered — they are either handled by WordPress language packs or by the plugin internally. Apart from the WooCommerce texts above, only strings from the domains you specify will be collected.

> For developers: Use standard WordPress __() and _e() functions with your theme’s text domain. Lang Forge hooks into the gettext filter and auto-registers strings from allowed domains. See the Developer Guide for details.

[Screenshot: The String Translation page showing the Domain and Translate to filters, and a table of strings with a translation box for each language]

—

Forge AI Assistant Online

Hi! I'm the Lang Forge AI assistant. Ask me anything about the plugin — setup, features, troubleshooting, or development.

Just now
Powered by Forge AI · Browse docs