Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

This topic contains 7 replies, has 3 voices.

Last updated by Andreas W. 1 year, 4 months ago.

Assisted by: Andreas W..

Author Posts
February 2, 2024 at 6:33 pm #15260787

jonasD-19

Hello,

We are trying to use facetWP in multiple languages by using the string translation option. But we noticed that the default language of the facetWP strings is in the wrong language.

We have 3 languages, NL, FR, EN.
Our main default language is NL.
Our facetWP is set up in NL.

When we go to string translation, we can see that the system thinks the default facetWP strings are EN instead of NL. So our options for translation are NL and FR, while we need to translate the strings to FR and EN.

How can we change this?

Thanks in advance!
Great customizable plugin, it's a shame there's no detailed youtube video's about this plugin.

February 2, 2024 at 10:02 pm #15261392

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi,

To resolve this please go to WPML->String Translation-> Locate the strings from the plugin (you can use the domain dropdown to filter) -> bulk select all the strings in the wrong language

click on the button below "change the language of selected strings" and set it to the correct language, then you will able to translate them 🙂

Now if it's more than a few strings I suggest following the steps from our documentation to change the language of the whole plugin domain

https://wpml.org/documentation/getting-started-guide/string-translation/how-to-change-the-source-language-of-strings/

February 3, 2024 at 10:29 am #15261921

jonasD-19

Hello Bobby,

Great thank you! That helped. Now the default language is in Dutch. But now I encountered another problem.

In the same dashboard (string translation) I translated the strings from facetWP. I got popups saying the translation has been saved. But when looking at the front end, it still shows in the default language.
I then selected the strings and pressed on the button "translate" under the "translate selected strings" to see if that would help. (Still in the string translation dashboard). Now there are hourglas icons next to the strings with the message "waiting for translator to translate to ..". I cannot edit anything regarding these strings.

Can you please advise? Am I missing something?

Thanks in advance!

Schermafbeelding 2024-02-03 112903.png
February 3, 2024 at 1:30 pm #15262105

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hi!

It might be that:

- the strings are lying inside the translation basket at WPML > Translation Management > Translation Basket

- or you already created translation jobs for those strings and they are available at WPML > Translations to get translated with the WPML Translation Editor.

Also, it could be that they are already assigned to a translator.

You should be able to complete those jobs by going to WPML > Translations or cancel those jobs by going to WPML > Translation Management > Jobs.

I hope this will solve this issue for you.

Best regards
Andreas

February 3, 2024 at 2:10 pm #15262186

jonasD-19

Hello Andreas,

Thank you for your assitance. I was able to complete the jobs in WPML > Translations. But this did not make any difference on the front end.

So now I translated them in string translation and WPML > Translations. But they still show the default language on the front end.

With kind regards,
Jonas

Schermafbeelding 2024-02-03 150400.png
Schermafbeelding 2024-02-03 150306.png
Schermafbeelding 2024-02-03 150057.png
February 3, 2024 at 4:01 pm #15262425

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

If this content was created with Elementor, then you can not use String Translation directly.

Did you try to translate your Elementor Templates with the WPML Translation Editor?

Are all taxonomies translated at WPML > Taxonomy Translation?

I would like to offer to have a closer look at the problem and request temporary access (wp-admin and FTP) to the website to investigate this issue further.

You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it.

IMPORTANT
Please be sure to make a backup copy of the website and database before allowing us access.
If you can't see the wp-admin / FTP fields, your post and website credentials are set as PUBLIC. DO NOT publish the data unless you see the required wp-admin / FTP fields.

The private response form looks like this:
hidden link

Next time you reply, click "I still need assistance."

Video:
hidden link

Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form.

Best regards
Andreas

February 5, 2024 at 9:23 am #15264890

jonasD-19

Hello Andreas,

Quick update:
We were able to translate the facetWP with these "workarounds".

For translating the facet choices we used a custom code snippit that is recommended by facetWP when there are no translation plugins.
For the facet labels we changed the title names in the 2 other elementor archive templates.

So now the facetWP filter is fully translated.
We could close this ticket, but still it should not be necessary to be using the code snippet to translate the facet choices?

With kind regards,
Jonas

February 6, 2024 at 11:12 am #15270938

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you for the information as far as I see FacetWP provided you with a filter that changes the strings according to the active language.

This further seems to work this way thanks to their own FacetWP Multilingual Addon and you might need to keep using this workaround.

Could you please confirm, if this is the issue that you are experiencing:

"When the FacetWP shortcode is being used inside an Elementor shortcode element, the label of the checkbox field are not showing the translation. In ACF, checkbox fields were created. The return value is Label. Then the post is edited with Elementor. The FacetWP shortcode [facetwp facet="test_new_checkboxes"] was inserted in the Elementor shortcode element. The labels do show for translation in ATE. Once they are translated the translation is in Strings Translation. But on the front end, the translated value is not shown. If I check the output with this code, the translated label is being passed."

If so, please let me know and take note that this issue was reported 9 months ago and we informed the author if FacetWP about it, who told us that they will solve this issue, but they could not name a timeframe yet.

We provided the following workaround for the issue, but you should use a Hello Elementor Child Theme in this case, as this might not work when using "Code Snippets":

Add the following code to the functions.php file of your Child Theme:

// WPML Workaround for compsupp-6751
function wpml_compsupp6751_translate_facet_display_value( $label, $args ) {
	if ( class_exists('Sitepress') ) {
		$wpml_default_lang = apply_filters('wpml_default_language', NULL );
		$wpml_current_lang = apply_filters( 'wpml_current_language', NULL );

		if ($wpml_default_lang == $wpml_current_lang ) {
			do_action( 'wpml_register_single_string', 'FacetWP', 'Facet Display Value : '.substr($label, 0, 10), $label );
		}	
		// Apply the translation to the string
		$label = apply_filters('wpml_translate_single_string', $label , 'FacetWP', 'Facet Display Value : '.substr($label, 0, 10) );
	}
    return $label;
}
add_filter( 'facetwp_facet_display_value', 'wpml_compsupp6751_translate_facet_display_value', 10, 2 );

Best regards
Andreas

The topic ‘[Closed] Facetwp default language is wrong language in string translation’ is closed to new replies.