Background of the issue:
I am trying to translate slugs in a way that product names like 'powert-platfotr' remain unchanged, while general words such as 'masterclass-external-portals' are translated. I provided examples of what I mean: hidden link and hidden link. We have hundreds of /blog/ posts that may need this treatment. I want to automate this process so I don't have to translate each slug manually.
Symptoms:
I expected to see that slug translations can be automatically set to translate only parts of them, not the whole slug.
Questions:
How do I automate the translation of slugs so that only certain parts are translated?
Is there a way to set this up so I don't have to translate each slug manually?...
As far as I can see, the two main topics were discussed. We may need to split the ticket into two, but let me summarize and provide some advice about them here.
<b>Topic 1 – Part‑slug translation</b>
• WordPress treats the slug as one string, so WPML can only translate or leave it wholesale.
• Glossary workaround: add “power‑platform” (identical in every language).
– Example FR slug →
power-platform-maîtrise-portails-externes
.
– Acceptable only if the English fragment can stay in all languages.
• Always test on staging first and keep a full backup.
• This is not a standard flow, so it's not guaranteed but a workaround that may help.
<b>Topic 2 – Imported translations being overwritten</b>
Why it happens
• XLIFF import, manual Gutenberg edits, and WPML’s Advanced Translation Editor (ATE) create separate “jobs”.
• When you later open ATE or trigger automatic translation, WPML regenerates its job and overwrites anything done outside that job.
• Translation Memory (TM) stores strings saved via ATE/automatic translation; offline CAT edits don’t enter TM.
<b>Workflow A – Pure XLIFF loop (safest for external translators)</b>
1 Create job in WPML → Translation Management.
2 Export XLIFF → translator edits → re‑import → click Complete.
3 Never reopen the same content in ATE/automatic translation.
<b>Workflow B – Hybrid (XLIFF + ATE)</b>
1 Import translator’s XLIFF, open once in ATE, click Complete (stores strings in TM).
2 Enable “Edit translation, but keep existing translations” in WPML → Settings.
3 Future changes to the source language will pre‑fill existing target strings instead of erasing them.
<b>FAQ quick answers</b>
• “Will resending a page wipe the translator’s work?” – Yes, unless you follow Workflow A or B.
• “Can I view or edit TM directly?” – Not in an admin screen; TM suggestions appear inside ATE but aren’t editable in bulk.
• “Why use WPML if a human translator does the work?” – WPML still handles multilingual URLs, language switcher, SEO meta, media duplication, and organized translation jobs.
<b>Next steps</b>
• Choose Workflow A (XLIFF only) or B (Hybrid) and verify on staging.
• Decide whether the Glossary workaround satisfies the slug requirement; if not, you may need custom code or full‑slug translation.
• Depending on your feedback, we may split this ticket into two (slug vs. workflow) so each topic gets dedicated tracking.
Best Regards,
Otto
The topic ‘[Closed] Translating parts of slugs’ is closed to new replies.