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 18 replies, has 2 voices.

Last updated by frankS-63 3 years, 9 months ago.

Assisted by: Riffaz.

Author Posts
June 30, 2020 at 6:54 pm #6489465

frankS-63

In my header template I use social media icons, however I can't find the links in the translation files. For every language there are different links but I Cant get to them in the template.
Is there a solution for this?

hidden link

July 1, 2020 at 3:56 am #6491217

Riffaz

Hi,

Thank you for contacting WPML support.

This really depends on how did you create the social icons and how did you add them to your header.
Are you using any plugin for this?
Does this come from your theme?

Could you please explain these with screenshots?

Regards,
Riffaz.

July 1, 2020 at 4:43 am #6491279

frankS-63

Hi Riffaz,

The social media icons are a Elementor widget with I inserted in a column in the Header and Footer. How can I do this so I can access translations?

Regards, Frank

Schermafbeelding 2020-07-01 om 06.38.11.png
Schermafbeelding 2020-07-01 om 06.37.25.png
July 2, 2020 at 4:44 am #6500641

Riffaz

Hi,

So this is a custom nw new Elementor widget.
In this case, we have to add some code for this.

Please create a temporary admin user.
Let me know the username and password in the next private reply.

Regards,

July 3, 2020 at 3:42 am #6509631

frankS-63

Hi Riffaz,

The credentials were out in the open here for 24 Hrs, I changed the password. Let me know if You still need to login.
How do I do "Private Reply"?

Frank

July 5, 2020 at 4:16 am #6522503

Riffaz

Hi,

Sorry for the delay in answering.
I do not work on Fridays and Saturdays.

I am making your next reply as private.
So you can use it to provide the correct access details.

Regards,

July 6, 2020 at 10:14 am #6529123

Riffaz

Hi,

Thank you for the access details.

This was a tricky and custom one to translate.
I added this code to your functions.php

add_action('init', function (){
        add_filter( 'wpml_elementor_widgets_to_translate', 'socialwidgetelementor' );
});


function socialwidgetelementor($widgets)
{
        $widgets['social-icons'] = array(
                'conditions' => array('widgetType' => 'social-icons'),
                'fields' => array(),
                'integration-class' => array(
                        'my_icons'
                        
                )
        );

        return $widgets;
}

class my_icons extends WPML_Elementor_Module_With_Items
{

        public function get_items_field()
        {
                return 'social_icon_list';
        }

        public function get_fields()
        {
                return array(
                        'link' => array( 'url' ),
                );
        }

        protected function get_title($field)
        {
                switch ($field) {
                        case 'url':
                                return __( 'Link', 'elementor' );
                       
                        default:
                                return '';
                }
        }

        protected function get_editor_type($field)
        {
                switch ($field) {
                        case 'url':
                                return 'LINK';

                        default:
                                return '';
                }
        }
}

Now you can see the links for social in WPML > Strings Translation.
Translate it as you want.

Hopefully, this is fixed now.

Regards,

July 7, 2020 at 6:12 pm #6541967

frankS-63

Hi Riffaz,

Could You please undo this solution? It does not work for me. There are two headers, one for Pc and tablets and one for phone's. The solution only works for the phone header.
Furthermore there are now strange issues in missing header and footer in the French and Dutch pages. And in the English pages half of the footer is missing.

July 8, 2020 at 6:54 am #6544949

Riffaz

Hi,

I removed the code we added but I do not think will make your footer disappear.
Anyhow, add back your footer and header as you want. Take a full backup of your site and let us know. Then we will check back.

Also, it would be better if you can create this in a test site. So we can proceed without affecting your site. If you do not have a test site. Let us know. we can create one for you.

Regards,

July 8, 2020 at 7:08 am #6545015

frankS-63

Hi Riffaz,

Thank you for the quick reply.
Could you set up a test site please?
I would like to resolve this issue.

Regards,
Frank

July 8, 2020 at 7:14 am #6545055

Riffaz

Hi,

1. please go to hidden link
2. install your elementor and social widget
3. create only the footer and header just like your site.
4. create only one test page
5. configure the WPML (already installed) as you have it in your site. at the last step (sitekey) just click next
6. check the issue on all devices
7. let us know how to check this step by step
We will create the correct workaround for this.

Regards,

July 8, 2020 at 12:41 pm #6548239

frankS-63

I can't configure WPML completely because I can't configure the menu language switcher because there is no menu in the site although there is a menu present.
Now what?

July 9, 2020 at 4:29 am #6553685

Riffaz

Hi,

Thank you for the try.

I've completed WPML configuration for you and you can add the menu language switcher now.
Please continue.

Regards,

July 9, 2020 at 10:29 am #6556229

frankS-63

Hi,

Done, pages are translated. You're up.

Regards, Frank

July 12, 2020 at 4:24 am #6576349

Riffaz

Hi,

I've escalated this to our 2nd tier. Please be patient till we get back to you again.

Regards,

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.