- Status
- Resolved
- Resolved in
- JetSmartFilters 3.2
- Related plugin/theme
- JetSmartFilters
- Topic tags
- Compatibility
Overview of the issue
When using the JetSmartFilters plugin to generate filters for JetEngine custom fields, the filter labels are not translated into secondary languages.
Workaround
Please make a full backup of your site before proceeding.
- Translate the labels using WPML → String Translation.
- Open the /wp-content/plugins/jet-smart-filters/templates/filters/checkboxes-item.php file.
- Replace the following snippet:
$checked_icon = apply_filters( 'jet-smart-filters/templates/checkboxes-item/checked-icon', 'fa fa-check' );
With:
$checked_icon = apply_filters( 'jet-smart-filters/templates/checkboxes-item/checked-icon', 'fa fa-check' ); $label = apply_filters('wpml_translate_single_string', $label, 'Jet Engine Admin Labels', 'Admin Label - '.$label ); - Then, open the /wp-content/plugins/jet-smart-filters/templates/filters/check-range.php file.
- Replace the following snippet:
foreach ( $options as $value => $label ) {With:
foreach ( $options as $value => $label ) { $label = apply_filters('wpml_translate_single_string', $label, 'Jet Engine Admin Labels', 'Admin Label - '.$label ); - Check the labels on the front-end. They should be translated now on second languages