*

belfis127

  • *
  • 2 posts
Language selector in main menu
« on: February 03, 2021, 11:07:19 AM »
How can I bring the language selection to the main menu?

*

MB Themes

Re: Language selector in main menu
« Reply #1 on: February 03, 2021, 12:34:35 PM »
@belfis127
You can copy language selector box from footer.php and copy it on whatever place you want.
It is possible also to copy it from other themes, but keep in mind you will have to adjust design of elements.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

belfis127

  • *
  • 2 posts
Re: Language selector in main menu
« Reply #2 on: February 03, 2021, 01:11:32 PM »
can you help me a little?

Where can I see an example implementation?

How can I correctly make a drop-down item with a choice of languages in the main menu from this code

Code: [Select]
     
<div class="langs">
        <?php if ( osc_count_web_enabled_locales() > 1) { ?>
          <?php $current_locale mb_get_current_user_locale(); ?>

          <?php osc_goto_first_locale(); ?>
          <?php while ( osc_has_web_enabled_locales() ) { ?>
            <a class="lnk lang <?php if (osc_locale_code() == $current_locale['pk_c_code']) { ?>active<?php ?>" href="<?php echo osc_change_language_url(osc_locale_code()); ?>"><img src="<?php echo osc_current_web_theme_url();?>images/country_flags/large/<?php echo strtolower(substr(osc_locale_code(), 3)); ?>.png" alt="<?php _e('Country flag''beta');?>" /><span><?php echo osc_locale_name(); ?>&#x200E;</span></a>
          <?php ?>
        <?php ?>
      </div>


*

MB Themes

Re: Language selector in main menu
« Reply #3 on: February 03, 2021, 04:20:55 PM »
@belfis127
Easiest way is to find it implemented in one of themes and copy it from there, otherwise it's on you to rewrite links to select box and do auto-redirect once value has been changed.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots