[Resolved] Where is the translation of home page filtering?
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing issues with the translation of home page filtering not appearing as expected on their website. Solution: We recommend the following steps to resolve the issue: 1. Ensure all WPML plugins, including WPML Multilingual CMS and String Translation, are updated to the latest versions. You can update these in the Plugins -> Add new -> Commercial tab. 2. Increase the WordPress memory limit to at least 256MB. This can be done by adding the following line to your
wp-config.php
file:
define('WP_MEMORY_LIMIT', '256M');
Place this line just above the '/* That's all, stop editing! Happy publishing. */' line. 3. Depending on how your filters are constructed: - If based on categories, tags, or custom taxonomies: Translate these under WPML → Taxonomy Translation. - If based on custom fields: Set the translation preferences for these fields under WPML → Settings in the Custom Field Translation section. - If the filters involve strings from your theme or plugins: Use WPML → String Translation, and you might need to scan your theme or plugins for strings first under WPML → Theme and plugins localization.
If these steps do not resolve the issue or if the solution seems outdated or not applicable to your case, 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. If further assistance is needed, 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.
I kindly ask you to follow these steps:
1.- Create a full site backup and update all WPML plugins to the latest version in Plugins -> Add new -> Commercial tab.
Thank you very much for sharing the information requested.
1.- Please create a full site backup and update all outdated plugins and themes that appear in this link: hidden link
The outdated functionalities can cause conflicts in the code.
2.- Also, I need you to describe the steps to edit the productselect shortcode, or share a URL where it can be edited.
The reason why your product selector is not appearing correctly in the secondary language is because the plugin does not currently register the option names for translation with WPML. Since the product options are stored in a custom database table, WPML cannot detect or translate them automatically.
To fix this, please follow these steps:
Steps to Make the Product Selector Multilingual with WPML
1. Register Option Names for Translation
When saving an option (in the admin page), add the following action to register the option_name string with WPML:
This will allow you to translate each option label from WPML → String Translation.
2. Display Translated Strings on the Front-End
In your shortcode that generates the dropdown ([productselect]), use the following code to display the translated option names:
Replace the original $option->option_name with $translated_name inside your <option> HTML output.
3. Clear Cache and Re-Test
Once the changes are made:
- Visit WPML → String Translation and translate the new strings under the "Product Selector" domain.
- Clear any caching plugins or browser cache.
- Visit the secondary language version of the page with the [productselect] shortcode.
This should ensure that your dropdown options are properly translated and appear correctly across all languages.