Child Themes and Parent Themes:
Where Strings Duplicate—and How to Translate Once
A child theme is supposed to isolate your customizations. gettext does not always cooperate. The same English sentence can appear under the parent text domain, again under the child domain, and once more inside WooCommerce or a page builder package. Translate naively and you pay three times for the same phrase, risk three slightly different German renderings, and confuse reviewers who cannot tell which file actually loads on the storefront.
Updated 2026
Developer-facing guide
The goal is not philosophical purity. The goal is predictable MO files: one authoritative translation per customer-visible fragment, loaded from the domain WordPress actually calls at runtime, with overrides documented so the next developer does not “fix” wording by editing the wrong catalog.
Loco Translate makes every domain visible, which is both the feature and the hazard. Without a map, bulk assists scatter translations across parent and child projects like glitter. With a map, you batch-fill the canonical domain, copy or link where WordPress duplicates intentionally, and reserve child-only domains for strings that truly originate in your override templates.
That workflow pairs naturally with Loco AI Auto Translator scoped bulk jobs that target one text domain at a time for parent versus child theme bundles, so automation respects the inventory you wrote down instead of guessing which project owns a line of checkout copy.
Why child themes multiply gettext surfaces
WordPress loads the child theme’s style.css header and falls back to parent templates when the child does not override a file. Translation functions inside parent templates typically use the parent text domain. When you copy a template into the child to adjust markup, many teams keep the same domain call out of habit; others switch to the child slug because documentation once said “use your theme name.” Both patterns exist in the wild, and Loco faithfully lists whichever domain the code requests.
The official introduction to child themes explains the inheritance model: child code runs alongside parent assets, not instead of them in every path. That inheritance is why gettext can surface identical user-facing text twice with different domain headers. Your operational response is not to complain about WordPress; it is to decide which domain is authoritative for each template layer. The WordPress Theme Handbook chapter on child themes belongs in the same onboarding doc as your Loco project naming standard.
Strings originate in the parent domain until you override the template and redeclare the domain in the child copy.
Duplicating woocommerce/cart/cart.php into the child without reconciling domains creates parallel catalogs with the same English.
Store owners reading this without a computer science background still deserve clarity: a child theme does not automatically “inherit translations” the way it inherits CSS. gettext domains are declared in PHP function calls. If your agency never showed you that mapping, ask for it before approving another localization invoice. The end-user overview on WordPress.org documentation explaining child themes for site builders helps non-developers understand why duplicate English lines can appear in Loco even when the storefront looks unified.
Inventory: map domains before you touch bulk translate
Open a spreadsheet or a plain text runbook. Columns: msgid fragment (or stable key), parent domain, child domain, WooCommerce core, plugin domain, and “loads on front / checkout / account / email.” Scan the child theme directory for PHP files and note which ones override parent paths. If a file exists only in the parent, its strings belong to the parent domain unless a filter changes loading behavior.
When two rows show identical English, ask whether both can appear in one HTTP response. If yes, they must resolve to the same translation or you will see mixed-language fragments. If only one can load because templates are mutually exclusive, you still may want one translation source to avoid drift during future edits.
Include must-use plugins and snippet plugins in the inventory. A small MU-plugin that filters gettext can redirect a parent-domain string to new English without changing the theme file you expect. Loco still shows the underlying catalog rows; the live site shows something else. When debugging “duplicate” complaints, reproduce with filters disabled on staging before blaming translators.
For teams using Loco’s sync against remote or bundled sources, note the timestamp of the last sync beside each domain row. Parent theme updates pulled from a vendor ZIP can shift catalogs underneath a child team that thought they were finished. A visible sync date prevents the classic argument about whether German checkout was “already done” before Black Friday.
| Scenario | Practical rule |
|---|---|
| Child copied parent template, same domain calls | Treat parent MO as canonical; child should not redefine unless msgid diverges. |
| Child copied template, switched domain to child slug | Child domain owns those rows; parent entries may become unused; archive carefully. |
| String appears in theme and in WooCommerce | Translate WooCommerce domain for core commerce labels; theme for presentation wrappers. |
| Page builder stores copy in database | Not Loco’s gettext row; track separately or export builder-specific language packs. |
Canonical domain strategy: translate once, load intentionally
Pick a rule your team can repeat without you in the room. A conservative pattern for storefronts: WooCommerce text domains own commerce vocabulary; the active theme domain owns presentation strings that wrap or annotate commerce output; child-only domains own net-new labels introduced in custom templates. When parent and child share identical msgids because of a copy-paste override, align the child file with the parent domain if the template is meant to stay upstream-compatible. When the child truly forks behavior, keep the child domain and accept that you maintain those rows separately.
Internationalization APIs expect translators to work against stable domains. The WordPress internationalization reference for developers is the shared vocabulary your engineers and localization leads should cite when debating whether a new wrapper string deserves its own domain or should reuse WooCommerce’s.
Commercial theme shops sometimes ship translation packs on their own schedule. If the parent bundles language files under a vendor-specific path while your child adds custom strings only in Loco, you operate a hybrid model. Document which locales rely on vendor MOs versus your custom PO exports. Mixing models without a chart guarantees someone runs a bulk assist against the wrong source of truth and wonders why French reverted to English on widgets only.
WooCommerce overrides: cart, checkout, and templates that look identical
WooCommerce template overrides are the classic duplication trap. The child theme holds a file with the same translatable fragments as the default template, sometimes with only minor HTML changes. Translators see two domains or duplicate rows and assume both need full review. Engineers should annotate the override header with whether strings were intentionally re-domained. If the answer is “we did not mean to change domains,” fix the code once instead of paying localization twice forever.
Block checkout and classic shortcode checkout may expose different string sets even when shoppers perceive one checkout. After major WooCommerce upgrades, rescan templates and re-run your inventory. A row that disappeared from the parent catalog might still linger in a stale child MO until someone compiles fresh files. Schedule MO regeneration as part of the same ticket that bumps WooCommerce, not as a follow-up someone might skip.
For agencies, attach screenshots of the cart and checkout in the parent-only state and again with the child override active. When stakeholders argue about “duplicate translation cost,” those screenshots prove whether two domains actually render in one view or whether one path is dead code waiting for deletion.
Align domains in PHP, then fill catalogs once.
Leave copied templates undocumented so every bulk run hits both parent and child blindly.
Glossaries, brand locks, and split domains
Glossary entries should be domain-agnostic where possible: a brand name is a brand name whether the string loads from storefront or storefront-child. When automation runs per domain, export glossary snapshots alongside each job so reviewers confirm the same locks applied everywhere. If one domain accidentally omits a glossary import, you will see divergent renditions of the same English promotional phrase within minutes of a bulk pass.
Locks matter most around price formatting, installment wording, and partnership trademarks. Those strings often appear in both theme footers and WooCommerce notices. Treat them as a shared vocabulary table maintained outside Loco if necessary, then sync into each domain’s run configuration.
Regional campaigns exacerbate duplication: a holiday banner string might be copied from parent marketing copy into a child-only template with a new domain because a junior developer followed an outdated tutorial. Glossary rows should tag campaign windows so automation does not bake in last year’s slogan when this year’s legal approval differs. Time-boxed entries feel bureaucratic until counsel rejects a phrase hours before launch.
Surgical edits when you cannot merge domains yet
Legacy clients freeze PHP edits during holiday code lockouts. You still owe locales accurate copy. In those windows, per-string assists inside Loco let you align problematic rows in the child domain to match the parent-approved rendering without re-translating hundreds of untouched lines. Document each manual alignment with a ticket comment so the next engineer knows to refactor domains when the freeze lifts.
Where single-string AI translation buttons inside Loco Translate for child theme gettext rows matter most is exactly here: bounded change sets, visible context, no wide blast radius.
Builders, widgets, and strings Loco will never own
Page builders and full-site editing kits often store user-visible sentences in post meta or JSON templates. Loco lists theme and plugin gettext, not your marketing hero heading from last summer’s campaign. When stakeholders report “duplicate English,” verify the source. Sometimes the fix is multilingual content strategy, not another PO export. Misrouting that work wastes glossary discipline on the wrong subsystem.
When builders do emit gettext strings via blocks, they may introduce yet another domain tied to a companion plugin. Add that domain to your inventory with the same rigor as parent and child slugs. Bulk assists should never run against “all theme domains” as a vague checkbox; they should run against an explicit list approved in the ticket.
Multilingual URL strategies interact with theme strings more than people expect. A subdirectory locale install might load different menu walker classes, each with its own gettext calls. If your inventory only lists “primary theme,” you miss those pathways until a native speaker spots an English crumb on a localized path. Extend inventories with URL patterns, not only plugin names.
API providers, keys, and separating theme jobs from plugin jobs
Translation providers bill by token volume. Parent and child duplication burns tokens twice if your prompts repeat identical msgid lists. Run assists against the smallest defensible batch: finish WooCommerce core, then parent theme presentation, then child deltas. Staggering jobs also makes failure isolation easier when one provider degrades mid-run.
Separate API keys per environment if staging and production both run assists. Nothing in gettext theory requires shared keys; operational hygiene does. When keys rotate, update the configuration documented in your handoff package so freelancers do not resurrect revoked credentials from an old screenshot.
Observability helps: log each bulk assist with domain list, row counts, operator name, and glossary version. When a client insists parent and child “should match,” you can show whether the job ever touched both domains or only one. Evidence ends subjective debates faster than another round of spot translations.
Long-term hygiene: refactors that pay down duplication debt
Schedule quarterly theme audits. Remove override files that no longer differ materially from parent templates. Collapse domains where politics allow. Each deletion reduces Loco project surface area and lowers the odds that a future bulk job reintroduces mismatched synonyms. Treat gettext debt like CSS debt: invisible until it blocks a launch, then expensive.
Train client engineering leads to mention domain decisions in pull requests. A single line in the PR template, “gettext domain unchanged / changed because …,” prevents silent duplication more effectively than another localization tool purchase.
Performance-minded teams sometimes lazy-load translation files per route. That optimization does not remove duplication; it only changes when MO data enters memory. Your domain map should mention lazy-load boundaries so translators know why certain strings appear inactive in QA until a specific template renders. Misreading that behavior as “missing translations” triggers redundant bulk jobs.
Accessibility copy in themes—skip links, aria labels, live region announcements—often lives beside visual strings in the same template. Those rows deserve the same domain discipline as marketing headlines because screen reader users encounter both. Duplicating aria strings across parent and child domains is a failure mode that shows up in audits, not in casual browser glances.
Child themes exist to protect customizations through upstream updates. gettext strategy should match that intent: inherit translations when you inherit templates; fork translations only when you fork behavior. Loco makes the work visible; discipline makes it affordable.
When white-labeling the same child theme across multiple client brands, centralize shared parent translations in a private library and fork only client-specific rows. Otherwise each engagement re-translates identical commerce scaffolding under different ticket numbers, and your margin disappears into redundant review cycles nobody scheduled. Name that library in estimates so procurement understands what they are buying beyond hourly translation. Without that line item, finance assumes every brand is a greenfield gettext project.
If your WooCommerce shop needs automation that respects domain boundaries instead of amplifying duplicates, the Nexu WP Loco AI Auto Translator plugin for WordPress with glossary-aware bulk and per-string gettext assists keeps assists inside Loco where your inventory already lives.
I just had to pop in and say this guide was a really helpful for me. i was seriously drowning in duplicate translations between parent and child themes what a mess! but that "string inventory" tip? Absolute lifesaver. i mapped out all my domains first, organized my bulk jobs, and now my WooCommerce store finally has clean, consistent translations everywhere.
This tool saved me hours mapping out duplicate strings between my parent and child theme. Before, I'd waste time translating the same phrase in three different places, then scratch my head when my storefront showed inconsistent wording
Bought this for our shop's dev team after wasting way too many hours on duplicate translations in a child theme. The section on gettext domains was a total lifesaver our parent and child themes were basically fighting over the same strings, and Loco Translate just made everything more confusing by dumping it all in one place. now we map domains first, translate in the right spot, and actually trust what comes out. No more paying to translate the same phrase three times or guessing which file will actually load.
Hey, I bought this expecting a clear solution for handling translations between parent and child themes, but the documentation is a mess. The guide mentions how child themes create duplicate strings across domains, but it doesn't actually explain how to prevent that from happening in practice. i followed the steps to copy woocommerce/cart/cart.php into my child theme, and now I've got the same English phrases appearing in three different translation catalogs parent, child, and WooCommerce