Viewing 15 replies - 1 through 15 (of 33 total)
  • Plugin Contributor Alex Gor

    (@alexgff)

    Thread Starter djforce

    (@djforce)

    No, I want to “RUS” button was on the English version of the site, and “EN” button has been at the same place on the Russian version of the site

    Thread Starter djforce

    (@djforce)

    Plugin Contributor Alex Gor

    (@alexgff)

    menu item for current language always has class ‘wpglobus-current-language’
    you can add css rule

    .wpglobus-current-language {
       display:none;
    }

    Thread Starter djforce

    (@djforce)

    Alex,
    what code is used to insert a button-flag in the site?

    Plugin Contributor Alex Gor

    (@alexgff)

    for example

    if ( class_exists( 'WPGlobus' ) ) {
    			echo '<div class="wpglobus-selector-box">';
    				$flag = WPGlobus::Config()->flags_url . WPGlobus::Config()->flag[ WPGlobus::Config()->language ];
    				echo '<img src="' . $flag . '" /> ';
    				echo '<span>' . WPGlobus::Config()->en_language_name[ WPGlobus::Config()->language ]. '</span>';
    				foreach( WPGlobus::Config()->enabled_languages as $lang ) {
    
    					if ( $lang == WPGlobus::Config()->language ) {
    						continue;
    					}
    					$flag = WPGlobus::Config()->flags_url . WPGlobus::Config()->flag[ $lang ];
    					echo '<a href="' . WPGlobus_Utils::localize_current_url( $lang ). '">';
    					echo '<img src="' . $flag . '" /> ' . WPGlobus::Config()->en_language_name[ $lang ];
    					echo '</a>';
    
    				}
    			echo '</div><!-- .wpglobus-selector-box -->';
    		}

    Thread Starter djforce

    (@djforce)

    Alex, Thanks. You may suggest:
    How to make a button with one flag in the menu?
    both on this site: https://www.crushmash.ru/

    Plugin Contributor Alex Gor

    (@alexgff)

    for your case

    if ( class_exists( 'WPGlobus' ) ) {
    			echo '<div class="wpglobus-selector-box">';
    				foreach( WPGlobus::Config()->enabled_languages as $lang ) {
    					if ( $lang == WPGlobus::Config()->language ) {
    						continue;
    					}
    					$flag = WPGlobus::Config()->flags_url . WPGlobus::Config()->flag[ $lang ];
    					echo '<a href="' . WPGlobus_Utils::localize_current_url( $lang ). '">';
    					echo '<img src="' . $flag . '" /> ';
    					echo '</a>';
    
    				}
    			echo '</div><!-- .wpglobus-selector-box -->';
    		}

    Thread Starter djforce

    (@djforce)

    Alex, i am sorry. How to insert this code to the site? Liki this:?

    <?php
        <you code>
    ?>
    Plugin Contributor Alex Gor

    (@alexgff)

    yes

    Hi, Alex
    I want to make a flag-button on menu too so users can switch language on cellphone. Can you teach me how and where to insert the codes in details?
    Thank you!

    Thread Starter djforce

    (@djforce)

    Alex, www2016, I mean the same thing

    Hi,

    I would like to know how I can have only one flag per page. I would like to see the English flag when I am on the Spanish version of my website and viceversa.

    Questions:
    1. What is the code?
    2. Where I have to insert it?

    Thanks,

    Jorge

    Hi,

    I upgraded to WPGlobus Plus but I got these errors:

    ACF Plus: Multilingual WYSIWYG Advanced Custom Fields
    Requires ACF version 4.4.3 or later installed and active.

    TablePress: Multilingual TablePress
    Requires TablePress version 1.6.1 or later installed and active.

    Yoast SEO Plus: Multilingual Focus Keywords and Page Analysis
    Requires Yoast SEO version 2.3.4 or later installed and active.

    These are not errors, just notices that some of the “Plus” modules are inactive because they deal with ACF, Yoast or TablePress, etc. If you do not have those plugins installed, then some parts of the Plus will not operate. It’s normal and you should not worry.

    Thanks!

Viewing 15 replies - 1 through 15 (of 33 total)
  • The topic ‘how to make only one flag’ is closed to new replies.