WebsiteBaker Support (2.13.x) > General Help & Support

Any idea how to put country flag to menu?

<< < (3/4) > >>

ruebenwurzel:
Hello,

as i see, you found a solution wich is ok for you.  :-D

Matthias

sternchen8875:

--- Quote from: rumen on May 04, 2024, 07:13:43 PM ---the only issue I face is that in mobile version the language appears on the bottom of the page. Any idea how to keep it on the top?

--- End quote ---

if i look into the source code, the code for the flagmenu is part of a div, called fg-no-mobile. this div is defined in fitgrid.css and use a display:block on the desktop-view and a display:none on mobiles

Two possible way's (maybe more)

you use a new place for the flag menu, outside from the actual div fg-no-mobile, that is visible every time (maybe on the right side from the logo in the top)
or you add a second flagmenu with a new css-class, that is visible only on mobiles
from my personal view, in the mobile view the part in the top is a good place



It is very simple (for example), to split the div class="logo" into two parts or put in this div another div with the same menu-code like the flag-menu on desktop-view and define a fixed position on the right side of this div

To the discussion about the old WB-Version... i talk and write with a lot of users outside from germany and i've to say, i think we, here in german's are the only country, where you can order a domain with the latest php-version, one day after the release  :wink:
i spend a lot of time in the last weeks, to upgrade 4 pages in canada with wb 2.7 or wb 2.8.1. this pages works well in the frontend, but it was not possible, to admin some pages after the php-upgrade there. Of course, i use the latest WB, but it will not run, latest php-version there, in this contract, was a PHP 7.4. The user needs now a new contract with new conditions and latest version there was a PHP 8.2.0,  the active support for this end's at the end of this year (31 Dec 2024)
Not every owner can understand this and we germans can not understand, why others work with php 5.6

my tip for you: sometime's in the future, the provider of this page will switch off the old php-version's and the owner get the same problem with the admin area. be prepared for this. i work with locale copies on a locale server and i have it from all my customers. here i can test the whole WB-Upgrades, on rainy day's  ;-)

P.S.: in the case of the canada pages, the webmaster ordered a new server and copy the old wb-project to this server, but nothing works. he write a mail to me, but canada is far away from here. it was night here, but he was waiting for a answer. one hour later, he use the cms-builder from the provider and build a new page. all work was in vain, the upgrade was finish, but in a special folder from the old server   :|

rumen:
Well, I succeed to make it to appear in mobile menu like that but instead to appear in the right upper corner (as it is on the mobile menu appears in the left upper corner in the normal page ....

Code I used for CSS:


--- Code: ---.language-switcher {
      right: 35px;
    top: 5px;
    position: absolute;
   
.language-switcher__language {
  display: inline;
}
.language-switcher__language.language-switcher__language_active {
  background: #fde067;
  padding: 2px;
}
--- End code ---

Code I used for PHP:


--- Code: ---<div class="language-switcher" >
  <span class="language-switcher__language language-switcher__language_active"><a href="https://skylog.bg/pages/bg.php" class="" title="BG">BG</a></span>
  <span> / </span>
  <span class="language-switcher__language"><a href="https://skylog.bg/pages/en.php" class="" title="EN">EN</a></span>
</div>
--- End code ---

And I put that language switcher right after the code for the logo:


--- Code: ---<div class="logo">
<a href="<?php echo WB_URL; ?>"><img src="<?php echo TEMPLATE_DIR; ?>/logo.png" width="210" height="58" alt="<?php echo WEBSITE_TITLE; ?>" border="0" /></a>
</div>
--- End code ---

rumen:
Yes, dear. I'm sure at some point I will need to upgrade all old pages, but at the moment I really have no any time to do it. Just need a simple and working solution to make it work and after some months I will make a full upgrade. Not only for that page, but for few others as all.


--- Quote from: sternchen8875 on May 06, 2024, 10:13:30 AM ---
--- Quote from: rumen on May 04, 2024, 07:13:43 PM ---the only issue I face is that in mobile version the language appears on the bottom of the page. Any idea how to keep it on the top?

--- End quote ---

if i look into the source code, the code for the flagmenu is part of a div, called fg-no-mobile. this div is defined in fitgrid.css and use a display:block on the desktop-view and a display:none on mobiles

Two possible way's (maybe more)

you use a new place for the flag menu, outside from the actual div fg-no-mobile, that is visible every time (maybe on the right side from the logo in the top)
or you add a second flagmenu with a new css-class, that is visible only on mobiles
from my personal view, in the mobile view the part in the top is a good place



It is very simple (for example), to split the div class="logo" into two parts or put in this div another div with the same menu-code like the flag-menu on desktop-view and define a fixed position on the right side of this div

To the discussion about the old WB-Version... i talk and write with a lot of users outside from germany and i've to say, i think we, here in german's are the only country, where you can order a domain with the latest php-version, one day after the release  :wink:
i spend a lot of time in the last weeks, to upgrade 4 pages in canada with wb 2.7 or wb 2.8.1. this pages works well in the frontend, but it was not possible, to admin some pages after the php-upgrade there. Of course, i use the latest WB, but it will not run, latest php-version there, in this contract, was a PHP 7.4. The user needs now a new contract with new conditions and latest version there was a PHP 8.2.0,  the active support for this end's at the end of this year (31 Dec 2024)
Not every owner can understand this and we germans can not understand, why others work with php 5.6

my tip for you: sometime's in the future, the provider of this page will switch off the old php-version's and the owner get the same problem with the admin area. be prepared for this. i work with locale copies on a locale server and i have it from all my customers. here i can test the whole WB-Upgrades, on rainy day's  ;-)

P.S.: in the case of the canada pages, the webmaster ordered a new server and copy the old wb-project to this server, but nothing works. he write a mail to me, but canada is far away from here. it was night here, but he was waiting for a answer. one hour later, he use the cms-builder from the provider and build a new page. all work was in vain, the upgrade was finish, but in a special folder from the old server   :|

--- End quote ---

sternchen8875:

--- Quote from: rumen on May 06, 2024, 06:47:17 PM ---Well, I succeed to make it to appear in mobile menu like that but instead to appear in the right upper corner (as it is on the mobile menu appears in the left upper corner in the normal page ....

--- End quote ---

its solved now? in mobile and also in desktop-view, the menu is now in the right upper corner. add the flags now and everything is okay (or i understand it wrong)

Use part of the code in the top, to display the flags in this menu


--- Code: ---<div class="language-switcher" >
  <span class="language-switcher__language language-switcher__language_active"><a href="https://skylog.bg/pages/bg.php" class="" title="BG"><img src="<?php echo WB_URL; ?>/media/flags/bg.png" alt="BG" title="BG"></a></span>
  <span> / </span>
  <span class="language-switcher__language"><a href="https://skylog.bg/pages/en.php" class="" title="EN"><img src="<?php echo WB_URL; ?>/media/flags/en.png" alt="EN" title="EN"></a></span>
</div>
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version