Home›Support›English Support›[Resolved] Can't update product's slug after translating via WP Sheet Editor
[Resolved] Can't update product's slug after translating via WP Sheet Editor
This thread is resolved. Here is a description of the problem and solution.
Problem: You are testing the translation of products using WP Sheet Editor and encountering issues with updating the product's URL slug after translation. The setting to translate based on the product's title is configured, but the button to scan and update links is unresponsive. Additionally, translated products appear in WooCommerce's product list but not in WPML Multilingual & Multicurrency.
Solution: We recommend using a universal formula for slug creation that can be applied directly in WP Sheet Editor. Here's a step-by-step guide:
1. Open WP Sheet Editor and load your products. 2. Apply the following formula in the Slug column, which is based on the Title column:
3. Copy this formula down for all rows to update the slugs. 4. Save the changes and then proceed with the import.
This formula will help create URL-safe slugs by converting titles to lowercase, removing special characters, and replacing spaces with hyphens, ensuring compatibility across different languages.
If this solution does not resolve your issue or seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please open a new support ticket at WPML support forum.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Background of the issue:
I am testing the translation on a few products before applying it to the rest. I am using WP Sheet Editor. After translating a product according to a tutorial, I want to update the product's URL slug using WPML. The setting is configured to translate based on the product's title, which is desired.
Symptoms:
The product's URL slug cannot be updated after translation. The button in the settings to scan and update links does nothing. Translated products appear in WooCommerce's product list but not in WPML Multilingual & Multicurrency.
Questions:
If you will confirm that I should not use WP Sheet Editor to translate products to my purpose, there are questions about using Woo's Import/Export build in feature instead:
1) If I use WooCommerce's export/import function, does the spreadsheet need to include the original content/products - the ones that I'm translating from?
2) Is it necessary to translate the product's category/hierarchy if it was already translated separately?
3) Will the translation be unsuccessful if I don't provide 'import_translation_group' for translated items where the original product has it?
And still the question about products remains:
Why WC's products in english have list of 3 products, while WPML Multilingual & Multicurrency panel have only 1 product.
Languages: English (English )German (Deutsch )French (Français )
Timezone: Europe/Zagreb (GMT+02:00)
Ah yes, I apologize.
Can you try the following:
- WPML - > Support -> Troubleshooting:
– Synchronize posts taxonomies (for products and then for variations)
-- Clear the cache in WPML
-- Remove ghost entries from the translation tables
– Assign translation status to duplicated content
-- Set language information
-- Fix terms count
-- Fix post type assignment for translations
Do these appear now? I assume these products were all added through the same method (Woo's Import/Export?)?
### Explanation:
1. `LOWER(A2)`: Converts the title to lowercase.
2. `REGEXREPLACE(A2, "[^a-zA-Z0-9 ]", "")`: Removes all special characters except for alphanumeric characters (letters and numbers) and spaces.
3. `SUBSTITUTE(" ", "-")`: Replaces spaces with hyphens to form the slug.
4. `SUBSTITUTE("--", "-")`: Ensures that multiple hyphens (from extra spaces) are reduced to a single hyphen.
This will create URL-safe slugs regardless of the language, by eliminating any accented or special characters universally.
You can apply this formula in WP Sheet Editor in the **Slug** column and copy it down for all products.
- Open WP Sheet Editor, load products.
- Use the formula in the **Slug** column based on the **Title** column.
- Copy the formula down for all rows.
- Save the changes.
Tell me - how important it is to have products in WPML M&M menu?
If they are appeared in WC's product menu in specific language tab (as translated) is it ok then? Could there be any problems whatsoever?
If I duplicate the product - it is not shown in M&M menu. But I can still translate it manually (or via WP Sheet Editor) - is it ok if I do so? Could there be any problems/errors?
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.