Translate Pro Header custom buttons

Hi there,

Still didn´t figure out how to translate custom buttons added in the PRO} header with WPML. I translated the menus, but when I add a button directly on the header, I can´t translate it. Any help?

Hello There,

Thanks for writing in! Before you can translate the headers and the footers, please go to WPML > Translation Management > Multilingual Content Setup > Post Types Translation, and enable cs_header and cs_footer. After it is enabled, you should be able to edit the custom header/footer in different language just like how you translate the post/page contents.

Hope this helps.

Hi there. Thanks for the info. i did what you asked, but can´t figure out what to do next. i have to duplicate the header? Can you guide me step by step? Thanks?

Hello There,

Thanks for updating in! When you edit your custom header or footer, their should be a flag icon in the editor. You can click the flag of the language you are about to edit. Toggle the icon would switch you to the translation of the header or footer.

Please check your flag setting in the WPML because it is displaying a white flag.

Hope this helps.

Awesome. Thanks a lot

My flags are white because o f the layout I choose. Is there a way to change that white box inside the builder, where the flags are displayed? that box that you pointed with an arrow. or I will need to change the flag color. I wanted it to continue white on my navbar

Hi,

To change the flag color, you can add this in your child theme’s functions.php file


add_action('admin_head', 'change_ls_color');

function change_ls_color() {
?>
<style>
.cs-language-picker a {
    background-color: #000;
}

</style>
<?php
}

Hope that helps.

is there a specific place where I should put this code? Not working. i put in funtions.php of child theme, but nothing happens.

Hi there,

Please try adding the important and priority,

add_action('admin_head', 'change_ls_color', 9999999999 );

function change_ls_color() {
?>
<style>
.cs-language-picker a {
background-color: #000 !important;
}

</style>
<?php
}

I checked cornerstone and it’s the correct place (eg. admin_head ) but it’s not being recognized or overridden by other CSS.

Thanks!

Hi,

Not working. Can you take a look at this? Is it in the correct place?

Hi,

You can add the code after this.

// Additional Functions
// =============================================================================

Would you mind providing us with login credentials so we can take a closer look? Please provide following information:

Set it as Secure Note

  • Link to your site
  • WordPress Admin username / password
  • FTP credentials

All the best!

did not work

Hi there,

I tried it and it’s not working, even with builder hooks like cornerstone_before_load_preview and cornerstone_before_boot_app. Looks like it’s only used for internal hooks as cornerstone removes the enqueue in preparation for builder loading process. So yes, not possible to customize what’s within the builder. Note it doesn’t remove enqueue within the preview, just within the builder and the language switcher is part of the builder overlaying the preview.

The solution is uploading a flag with a border or with color.

Thanks!

ok. thanks

On behalf of my colleague, you’re welcome. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.