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.

This topic contains 3 replies, has 2 voices.

Last updated by Diego Pereira 4 years, 7 months ago.

Assisted by: Diego Pereira.

Author Posts
June 23, 2020 at 4:52 pm #6437125

susanneP-11

Hi, I have a plugin that I am using that adds filterable tags to content. I cannot get the tags to translate. How could I try and do this?
The content on the page is coming from a shortcode so I can't edit the page and change it there.
I also tried to find the string, but that plugin wasn't listed to view the source.

Any ideas?

hidden link

Screen-Shot-2020-06-23-at-12.48.36-PM.jpg
June 23, 2020 at 6:29 pm #6437469

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello, welcome to the WPML support Forum!

Could you send us an example of this shortcode?

It will probably be necessary to register it with XML code (wpml-config.xml - see https://wpml.org/documentation/support/language-configuration-files/). After that it should be available on the translation editor.

PS: To ensure the quickest and most accurate support, please provide your debug information so that I can get a look at some of your configurations. We have an excellent article on how to located here: https://wpml.org/faq/provide-debug-information-faster-support/.

NOTE:
Please be sure to check the box to indicate you can provide debug info and paste your debug info in the debug field provided, and NOT in the general response field.

June 24, 2020 at 5:29 pm #6446913

susanneP-11

This is the shortcode: [print_responsive_portfolio_plus_lightbox id="2"]

June 24, 2020 at 7:26 pm #6447353

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

It's possible to register it, then translate the ID attribute with the steps below:
- Add the following XML code to WPML > Settings > Custom XML Configuration

<wpml-config><shortcodes><shortcode><tag>print_responsive_portfolio_plus_lightbox</tag><attributes><attribute>id</attribute></attributes></shortcode></shortcodes></wpml-config>

- Now we need to remove the "numbers" filter from the translation management. Please add the following code to your functions.php file:

**
 * Allow translating numbers
 *
 * @see https://wpml.org/forums/topic/wpbakery-post-grid-element-exclude-from-filter-list-category-reappears
 */
function wpmlsupp_7499_allow_translating_numbers( $is_translatable, $job_translate ) {
    $data = $job_translate['field_data'];
	if ( 'base64' === $job_translate['field_format'] ) {
		$data = base64_decode( $data );
	}
    if ( is_numeric( $data ) ) {
    	return true;
    }
    return $is_translatable;
}
add_filter( 'wpml_tm_job_field_is_translatable', 'wpmlsupp_7499_allow_translating_numbers', 10, 2 );

- After that, go to the edit screen of the page (original language), do a small modification and save.
- After that, you should be able to transalte the ID using the translation editor.

Please let me know if it worked for you.