Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
You are trying to use the String Translation feature in WPML but do not see the 'Translate selected strings' option.

Solution:

This issue may be due to missing capabilities caused by permission settings from plugins. To resolve this, follow these steps:

1. Insert the following code into your theme's functions.php file:

add_action( 'init', 'add_caps' );
function add_caps() {    
$user = wp_get_current_user();   
$role = get_role( $user->roles[0] );
    if ($role->capabilities["manage_translations"] != TRUE) {
        $role->add_cap( 'manage_translations' );
    }
}

2. After adding the code, visit the String Translations page in WPML.

3. Remove the code from the functions.php file once you confirm the option is visible.

If this solution does not apply to your case, or if it seems outdated, we recommend checking the related known issues and confirming that you have the latest versions of themes and plugins installed. If issues persist, please open a new support ticket.

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.

Tagged: 

This topic contains 16 replies, has 2 voices.

Last updated by Shekhar Bhandari 9 months, 2 weeks ago.

Assisted by: Shekhar Bhandari.

Author Posts
September 19, 2024 at 2:22 am #16195730

antonT-13

Background of the issue:
I am trying to use the String Translation feature in WPML on my site hidden link. I followed the documentation at https://wpml.org/documentation/getting-started-guide/string-translation/#translating-strings-automatically-by-yourself.

Symptoms:
I don't have the 'Translate selected strings' option in String Translation when I select strings.

Questions:
Have you solved the issue of not having the 'Translate selected strings' option in String Translation?

September 19, 2024 at 3:09 am #16195801

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Welcome to WPML support. I'd be happy to help you with this.

Can you provide me a screenshot of your string translations page? I have attached a screenshot showing the section.

To assist you further, I’ll need more information. Could you please go to WPML > Support > Debug Information and share the details in your next reply? You can find step-by-step instructions here: http://wpml.org/faq/provide-debug-information-faster-support/

Look forward to your reply.

Thanks

translate_selected_strings.png
September 19, 2024 at 3:57 am #16195860

antonT-13

Yes

empty.png
September 19, 2024 at 4:18 am #16195879

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

To debug this issue further, I would need to check your site settings once, for this I would need temporary access (wp-admin and ftp) to your site.

So could you please provide me with those details, you will find the needed fields for this below the comment area when you log in to leave your next reply.
hidden link

This info is private and available to you and WPML supporters only.
Read more about this: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Note:
Backup your sites before providing the credentials or if possible provide credentials for the test site

Look forward to your reply.

Thanks

September 19, 2024 at 7:07 am #16196209

antonT-13

Are there any ways to reinstall wpml without losing content and translations to solve that issue?

September 19, 2024 at 7:09 am #16196256

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I don't think re-installing it will help. So we need to check why it's not working.

Thanks

September 19, 2024 at 10:35 am #16197925

antonT-13

I don't see the form to give you access(

September 19, 2024 at 10:36 am #16197930

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

I have enabled the private form for you.

September 19, 2024 at 11:38 am #16198281

antonT-13

How's it going?

September 19, 2024 at 2:12 pm #16199354

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

The issue is happening as it's missing some capabilities for the user, it might be due to the permissions plugins that you are using or from some third party plugins, to fix this issue, please follow the below steps:

Please paste the code in the theme functions.php file

add_action( 'init', 'add_caps' );
function add_caps() {
    $user = wp_get_current_user();
    $role = get_role( $user->roles[0] );
    if ($role->capabilities["manage_translations"] != TRUE) {
        $role->add_cap( 'manage_translations' );
    }
}

Visit the string translations page then remove the code from theme functions.php file.

Since we handle one issue per tickets, I suggest you to open new ticket/chat for your other issues as it's easier and efficient to handle.

Let me know if this helps.

September 19, 2024 at 2:52 pm #16199728
antonT-13

Thank you! I just reactivated the tablepress capabilities plugin and now it's ok. So there is no need to paste the code, right?
Could you please create a new ticket for me about slowing the site so I don't need to write access to wp-admin and FTP again?

New threads created by Shekhar Bhandari and linked to this one are listed below:

https://wpml.org/forums/topic/split-slowness-with-wpml-enabled/

September 19, 2024 at 2:57 pm #16199776

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

If the section is showing without the need of code, then there is no need for it.

I have created a new ticket for the performance issue.

Thanks

September 19, 2024 at 3:09 pm #16199854

antonT-13

Thanks!

September 20, 2024 at 9:06 am #16201799

antonT-13

Hi! After help we recognized that emojis turned into "?". Restoring the site doesn't help. Did you change any unicode or something else that became a reason of losing emojis?

Monosnap World of Warships Codes September 2024 - Free Ships and Doubloons 2024-09-20 11-51-01.png
September 20, 2024 at 9:13 am #16201916

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

No, the tests were done in localhost and the only changes made was the functions.php file. I didn't alter the database.

If the problem exists even after using the backup then it must be some third party theme/plugin conflict.

I suggest you to open a new chat so we can help on this further.

Thanks