Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #1431770

    Hi,

    The flag of languages not appear in phone burger menu.
    Could yo help me?
    Thanks advance,

    BR,

    Antonio.

    #1431967

    Hey Antonio,

    Thank you for the inquiry.

    The language flags should be displayed inside the burger menu overlay, positioned below the burger menu items. Please open the burger menu, and you should find the language flags within the menu overlay.

    Best regards,
    Ismael

    #1432131

    Hi Ismael,

    In computer if I reduce the window and upper the burgher I can see the Social network and the flags inside the menu.
    But in the mobile the flag and social network are not there.
    Thanks advance,

    BR,

    Antonio.

    #1432188

    IF it is a WPML Page

    there is on WPML Options a Setting for inserting the flags to menus:

    You can add there lang switch to every menu you have declared on your system.
    And you can set the look of them ( flag dimensions etc. )

    #1432364

    Hi Guenni,

    No its a Polylang.
    Here I send you a screenshot from mobile and computer.
    Thanks advance,

    BR,

    Antonio.

    #1432571

    Hi,

    Thank you for the screenshots.

    The language flags are visible on desktop view but the value of src attribute gets replaced on mobile view for some reason. Please provide the login details in the private field so that we can check the issue further. You can also use this code in the functions.php file to append the default language switcher beside the burger menu.

    add_action( 'ava_after_main_menu', 'wpml_switch_to_header' );
    function wpml_switch_to_header() {
            if(!wp_is_mobile()) return
    	echo do_action('wpml_add_language_selector');
    }

    Best regards,
    Ismael

    #1432577
    This reply has been marked as private.
    #1432795

    Hi,

    Thank you for the info.

    We just noticed that the site still contains a very old version of the theme. Please upgrade the theme from 5.1.2 to the latest version, 5.6.10. After the upgrade, please make sure to toggle or temporarily disable the Enfold > Performance > File Compression settings and purge the cache. Let us know if the upgrade helped fix the issue.

    Best regards,
    Ismael

    #1461914

    Hi Ismael,

    I updated the theme, disable file compression and purge the cache but the flags not appearing
    Could you help me?
    Thanks advance,

    BR,

    Antonio.

    #1461959
    #1461960

    Hi Guenni,
    No have not installed WPML I have install Polylang.
    Thanks!

    #1461970

    Hi,
    It looks like the flags are in the mobile menu, but your caching plugin has made them “lazy loaded” so they won’t show. I couldn’t find the lazy load option in your caching plugin, but I have not used that one before. Typically you can add classes to disable the lazyload so try adding lang-item to the setting. If this doesn’t help try disabling the caching plugin completely and see if the corrects, if not leave the caching plugin disabled and we will check again.

    Best regards,
    Mike

    #1462002

    besides that : this is the shortcode for polylang lang switch:

    function custom_polylang_langswitcher() {
      $output = '';
      if ( function_exists( 'pll_the_languages' ) ) {
        $args   = [
          'show_flags'    => 1,
          'hide_if_empty' => 0,
          'show_names'    => 1,
          'echo'          => 0,
        ];
        $output = '<ul class="polylang_langswitcher">'.pll_the_languages( $args ). '</ul>';
      }
      return $output;
    }
    add_shortcode( 'polylang_langswitcher', 'custom_polylang_langswitcher' );

    there are a lot of args you can use to manage the way it looks like:

    /**
    * @param array     $args {
    *   Optional array of arguments.
    *
    *   @type int      $dropdown               The list is displayed as dropdown if set, defaults to 0.
    *   @type int      $echo                   Echoes the list if set to 1, defaults to 1.
    *   @type int      $hide_if_empty          Hides languages with no posts ( or pages ) if set to 1, defaults to 1.
    *   @type int      $show_flags             Displays flags if set to 1, defaults to 0.
    *   @type int      $show_names             Shows language names if set to 1, defaults to 1.
    *   @type string   $display_names_as       Whether to display the language name or its slug, valid options are 'slug' and 'name', defaults to name.
    *   @type int      $force_home             Will always link to home in translated language if set to 1, defaults to 0.
    *   @type int      $hide_if_no_translation Hides the link if there is no translation if set to 1, defaults to 0.
    *   @type int      $hide_current           Hides the current language if set to 1, defaults to 0.
    *   @type int      $post_id                Returns links to the translations of the post defined by post_id if set, defaults not set.
    *   @type int      $raw                    Return a raw array instead of html markup if set to 1, defaults to 0.
    *   @type string   $item_spacing           Whether to preserve or discard whitespace between list items, valid options are 'preserve' and 'discard', defaults to 'preserve'.
    *   @type int      $admin_render           Allows to force the current language code in an admin context if set, default to 0. Need to set the admin_current_lang argument below.
    *   @type string   $admin_current_lang     The current language code in an admin context. Need to set the admin_render to 1, defaults not set.
    *   @type string[] $classes                A list of CSS classes to set to each elements outputted.
    *   @type string[] $link_classes           A list of CSS classes to set to each link outputted.
    * }
    */

    some quick css:

    .lang-item {
      display:inline;
      padding-left:5px;
      list-style:none;
    }
    #1463354

    Hi Mike and Jenni,

    Finally was a total cache fail. I changed the cache plugin to Lite Speed and works perfect.
    Many thanks,

    BR,

    Antonio.

    #1463386

    Hi,
    Glad to hear that you have this sorted out, if you have any further questions please open a new thread and we will be happy to help.

    Best regards,
    Mike

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘The flag of languages not appear in phone burger menu.’ is closed to new replies.