Fixing Missing Spaces in TranslatePress Translations
Content
If you're using TranslatePress and finding that your translated text has words awkwardly stuck together without spaces, you're not alone. This is a common issue reported by users, particularly when dealing with formatted text (like bold or italic elements) or when using automatic translation services like Google Translate. This guide will explain why it happens and walk you through the most effective solutions.
Why Do Spaces Disappear in Translations?
Based on community reports, this spacing issue typically occurs for two main reasons:
- HTML Formatting: When your original text contains HTML elements (like <strong>, <em>, or <span>), TranslatePress often breaks the content into separate translation strings. A common example is a bold word followed by a comma and regular text (e.g., <strong>Shaping Minds</strong>, Shaping Society). The plugin may treat the bold text, the comma, and the following text as three distinct blocks. If the automatic translation engine doesn't add a space between these blocks when they are reassembled, the words merge together (e.g., "Shaping Minds,Shaping Society").
- Automatic Translation Limitations: Machine translation services, such as Google Translate, have inherent limitations. They process and translate text based on their own algorithms, and sometimes they output translated text without the necessary spacing, especially when translating from languages that don't use spaces (like Chinese) or when handling numbers and special formats.
How to Fix Missing Spaces in Your Translations
Here are the most effective solutions, compiled from successful community resolutions.
Solution 1: Use the Merge Tool in the Translation Editor
This is the most frequently recommended solution for issues caused by HTML formatting. The merge tool allows you to combine multiple small translation strings into a single, larger block. This gives the translation engine more context and often results in proper spacing.
- Navigate to TranslatePress → Translation Editor on your WordPress dashboard.
- Select the language you are translating into.
- Browse to the page with the spacing issue and locate the problematic strings. You will likely see them listed as separate items (e.g., one for the bold text, one for a comma, one for the next word).
- Use the up arrow icon (↑) next to each string to merge them together into a single translation block.
- Once merged, you can use automatic translation on the full block or manually edit the translation to ensure correct spacing exists between words.
- Save your changes.
Solution 2: Manual Translation Editing
For some cases, particularly with numbers or stubborn automatic translation errors, manual correction is the most reliable method.
- In the Translation Editor, find the string that is missing spaces.
- If the string is locked for manual editing because it was auto-translated, you may need to first exclude it from automatic translation. This can often be done by clicking a button to "enable manual translation" or similar.
- Click into the translation field and simply type the correct translation, making sure to add the necessary spaces yourself.
- Save your changes. This manual translation will not be overridden by the automatic service.
Solution 3: Disable Number Translation
If the issue specifically involves numbers being formatted with spaces (e.g., 100 000 instead of 100,000), a common fix is to prevent numbers from being translated at all. This keeps the original format consistent across all languages.
- Go to TranslatePress → Settings.
- Click on the Advanced tab.
- Locate the Exclude strings from translation section.
- Find and check the option for Translate Numbers to disable it. This will leave all numbers in their original format.
- Save your changes.
Conclusion
Missing spaces in translated text are usually a side effect of how content is structured with HTML or the limitations of machine translation. While not a "bug" in the traditional sense, it is a common formatting challenge. The primary solution is to use the merge function to create larger, more coherent blocks of text for translation. For finer control, manual editing or excluding numbers from translation often provides a perfect fix.
Related Support Threads Support
-
No space in translated versionhttps://wordpress.org/support/topic/no-space-in-translated-version/
-
Specify Number formatshttps://wordpress.org/support/topic/specify-number-formats/
-
Need to add spaces to words after translating from Chinese to Englishhttps://wordpress.org/support/topic/need-to-add-spaces-to-words-after-translating-from-chinese-to-english/
-
No spaces between words in translated lineshttps://wordpress.org/support/topic/no-spaces-between-words-in-translated-lines/
-
Space in translations dissapeared after bold text with commahttps://wordpress.org/support/topic/space-in-translations-dissapeared-after-bold-text/