Creating Language Switcher (Dropdown) HTML + CSS with Flexbox

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 พ.ย. 2024

ความคิดเห็น • 84

  • @tn01288
    @tn01288 3 ปีที่แล้ว +13

    I think you should use "visibility: hidden/visible" instead. It prevents that element from moving. Great video, it's really helpful

  • @tahirmathin
    @tahirmathin 3 ปีที่แล้ว +3

    This was amazing . you explain very well. Most of the other people don't realy explain very well.you do, for example the jumping thing that happend before putting the position as absolute. Many people just write it down and don't tell why and what is it for.

    • @BlueBitsAcademy
      @BlueBitsAcademy  3 ปีที่แล้ว +2

      Thank you , your commnent is very nice :) , you are welcome always

  • @jamieadah4154
    @jamieadah4154 3 ปีที่แล้ว +8

    i can't find the country flags site. Says 'server not found' is there another way to do this?

  • @Phagocytosis
    @Phagocytosis 7 หลายเดือนก่อน

    This is great, thank you! My only issue was that if I hover even a little bit below the selected language, it already showed the ul. I just had .lang-menu: hover ul { display: block; }, of course. Turns out that if I add a height parameter to .lang-menu {}, that works out. I set it to 35px, as well as the top parameter in .lang-menu ul {}, and that worked a charm. Thanks again :)

  • @HexerMain
    @HexerMain 4 ปีที่แล้ว +20

    Great tutorial! Can you also make a video about how to actually make the language on the website change? Maybe using JS? Would love to see that! You'ev got my sub! Keep it up man! You're really experienced and I love that you explain and show all steps! Props!

    • @terrytari1891
      @terrytari1891 3 ปีที่แล้ว

      Why do I have to go throuth ALL This! Where is the Spanish language button?

    • @BlueBitsAcademy
      @BlueBitsAcademy  3 ปีที่แล้ว +4

      Great suggestion!, I will do it with javascript yes

    • @awn01
      @awn01 3 ปีที่แล้ว +1

      @@BlueBitsAcademy Hi, I was wondering have you made this already? (make the language on the website change)
      Thank you.

    • @nidaleepearl4108
      @nidaleepearl4108 3 ปีที่แล้ว +1

      @@BlueBitsAcademy did you doi it ?

    • @maze532
      @maze532 2 ปีที่แล้ว +1

      @@BlueBitsAcademy hey i wanted to see if you have made this video already? It would be of great help!

  • @CRBarchager
    @CRBarchager 2 ปีที่แล้ว +1

    Very nice turorial. The links to the flags don't work anymore. No website with that name.

  • @mugen2639
    @mugen2639 4 ปีที่แล้ว +7

    Great tutorial. Very easy to follow and I have learned many new things.

  • @maze532
    @maze532 2 ปีที่แล้ว +3

    Hello! I know this is very late to ask, but will you ever upload a video on how to make the website actually change the language also by using HTML/CSS or if you don't make a video just upload the code somewhere so i can study it. Thank you so much it would be lovely!

  • @jxzh-me
    @jxzh-me 2 ปีที่แล้ว

    Y’all don’t have to make it an href, just put in cursor: pointer; into the CSS code of the Element

  • @Phagocytosis
    @Phagocytosis 7 หลายเดือนก่อน

    Oh, but isn't a major thing that is missing the fact that the selected-lang does not get updated, and in particular the background-image in selected-lang:before? That seems really tricky, how could this be done?

    • @Ruoja71
      @Ruoja71 7 หลายเดือนก่อน +1

      All I came up with is making new html files for each language, as if you were making side pages.
      You basically copy/paste your index file, change the "selected-lang" to something else i.e. selected-lang-fr for french. Then in your css file you need to copy/paste .selected-lang and selected-lang:before paragraphs as many times as much languages you have on your list, change the flag url and ajust the width value so different language names fit their flags.
      Looks like a lot of repetitions and kind of hurts my soul... I hope there is some more efficiant way to specify those things only once like any self-respecting programer would do. You need to translate entire website content anyway... So you will end up with all your side pages' files multiplied by the number of languages...

  • @seraphiaarks
    @seraphiaarks 3 ปีที่แล้ว +1

    Thank u! The instructions are very clear. Very nice video!

  • @danny_racho
    @danny_racho 4 ปีที่แล้ว +2

    أحلى أبو الفود. خمسمية محروقة لل badding
    بس لا ولله تعلمت كتير. تسلم أيديك

  • @dagemdebebe9983
    @dagemdebebe9983 2 ปีที่แล้ว +2

    Thank You Sir. It is one of the best tutor in multi lingual. Can you make a simple tutorial how to insert a word in different language like chinese or Arabic or other in Html input form, like name or nay plain text ? Thanks.

  • @MyNery2
    @MyNery2 3 ปีที่แล้ว +1

    Very nice example and explanation, but I can't use it because when you chose a flag it will not show up at the top of the dropdown. It's showing all the time the English flag and English language. I tried to fix this with javascript but the text changes for some seconds and then goes back to the original text. That's a problem when you use rails. I tried to find a solution but until now I couldn't find a way. Can you tell me how I can do it? I want to use it with i18n. Everything is working fine. Locales are changing.

  • @SvidetelK
    @SvidetelK 9 หลายเดือนก่อน

    One of solutions to cure "disappearing list" is to change .lang-menu .selected-lang:before {width} to a bigger number

  • @FranckFasano
    @FranckFasano 2 ปีที่แล้ว

    Many thanks, excellent tuturial help me a lot !

  • @igorsbondarevs8717
    @igorsbondarevs8717 3 ปีที่แล้ว +2

    Whenever i click on the box it dissapears when i try to hover over the other languages in the box, Whats the soloution for this?

    • @Phagocytosis
      @Phagocytosis 8 หลายเดือนก่อน

      Perhaps you put the 'top' pixels to too high of a number in .lang-menu ul, so that the actual dropdown menu shows a little bit detached from the button. That way, if you move the mouse toward the dropdown menu options, it first leaves the menu, thus removing the hover effect. When I tried 40px, I had that problem at first, but when I reduced to 30px it was fine. (Specific numbers probably depend on your precise implementation.)

  • @Webtricker
    @Webtricker 2 ปีที่แล้ว +1

    Very helpful tutorial. easy to learn👌

  • @vvv_06
    @vvv_06 3 ปีที่แล้ว +1

    How does the language work? I wanted to see that part

  • @AhmadElkhouly
    @AhmadElkhouly 3 ปีที่แล้ว

    Are you Egyptian? Your English is very good. Great tutorial and effort. Thanks!

  • @apelsin4ik2901
    @apelsin4ik2901 2 ปีที่แล้ว

    Thank you very much, you helped me a lot.

  • @mohammadabutalib1225
    @mohammadabutalib1225 3 ปีที่แล้ว

    Sir, u r calling fonts n others via import from google, what if u r going offline for some reason? It"ll not work, how can i solve it

  • @yosko597
    @yosko597 2 ปีที่แล้ว

    If i want to just show the flag and that once u click , It changes languague how would i do It ?

  • @malunlujo7864
    @malunlujo7864 3 ปีที่แล้ว

    Isn't responsive for mobile??

  • @shafiqurrehman6184
    @shafiqurrehman6184 3 ปีที่แล้ว

    languages are not change
    when i put this code on my website

  • @lmaocoaching-fifa6590
    @lmaocoaching-fifa6590 ปีที่แล้ว

    Tks so much bro :D

  • @DeepakPatel-we7wz
    @DeepakPatel-we7wz 3 ปีที่แล้ว

    Hlo sir I just want to know that how can i attach this language option in whole website. I mean anyone can change language at any moment

  • @happymountain4855
    @happymountain4855 3 ปีที่แล้ว

    Is it possible to make this dropdown menu also avaible on mobile phones? When you look at a website on a mobile phone it doesn't work.

    • @BlueBitsAcademy
      @BlueBitsAcademy  3 ปีที่แล้ว

      I can do that in another tutroial, soon :)

  • @maartenvissers283
    @maartenvissers283 3 ปีที่แล้ว

    How does this work on mobile?

  • @soniadarshsuresh8240
    @soniadarshsuresh8240 ปีที่แล้ว

    js part ?

  • @nguyenduycong6032
    @nguyenduycong6032 3 ปีที่แล้ว

    Nice , thanks bro

  • @syanhnguyen2233
    @syanhnguyen2233 11 หลายเดือนก่อน

    Today 12/12/2023, thanks!

  • @blankerhans9659
    @blankerhans9659 3 ปีที่แล้ว

    9:17 the .selected-lang:befor doesn’t work the {} don’t recognize the css code anymore. Any1 knows why?

  • @sedatcakir9428
    @sedatcakir9428 4 ปีที่แล้ว +3

    please .. can you program it for me so that if you click it can be translated?

    • @sedatcakir9428
      @sedatcakir9428 4 ปีที่แล้ว

      You're welcome. need the code. i need it by thursday

  • @pericab35
    @pericab35 3 ปีที่แล้ว

    Doesn't change flag...

  • @ahmedutuber
    @ahmedutuber 2 ปีที่แล้ว

    we need how to converting many lang not only style css

  • @revanaxundov
    @revanaxundov 9 หลายเดือนก่อน

    Thanks man

  • @amroabdalwahed5315
    @amroabdalwahed5315 2 ปีที่แล้ว

    thanks man!

  • @clubgenius2736
    @clubgenius2736 3 ปีที่แล้ว

    Thanx buddy 😌

  • @germanorozco696
    @germanorozco696 3 ปีที่แล้ว

    Hi, thanks but the UL tag with the languages shows back another elements. How can I fix this ?

    • @Rob3445
      @Rob3445 3 ปีที่แล้ว

      This may be too late but to fix the issue, remove the top:45px or set it to 0

    • @germanorozco696
      @germanorozco696 3 ปีที่แล้ว

      @@Rob3445 thanks. I have to change all code or do that of another way to continue working .

    • @laurentziuagapov4463
      @laurentziuagapov4463 3 ปีที่แล้ว

      @@Rob3445 35px is perfect

  • @hebah_Saleh
    @hebah_Saleh 2 ปีที่แล้ว

    can someone tell me the website that he take the flags and code from, cuz i can't find it?

    • @adamadness2283
      @adamadness2283 2 ปีที่แล้ว

      I think it’s website is down

  • @zakhariihusar6975
    @zakhariihusar6975 3 ปีที่แล้ว

    Great video👍

  • @ob7349
    @ob7349 3 ปีที่แล้ว

    👏🙏Thank you a lot)))🙂

  • @smislovva
    @smislovva 3 ปีที่แล้ว +2

    my flag doesnt change
    (((

    • @aaniaa
      @aaniaa 3 ปีที่แล้ว

      Hi, I've got same problem. Did u sort it out?

    • @BlueBitsAcademy
      @BlueBitsAcademy  3 ปีที่แล้ว

      why its not changing? , i mean what is the problem?

    • @Phagocytosis
      @Phagocytosis 7 หลายเดือนก่อน

      ​@@BlueBitsAcademy In selected_lang:before, the default language's flag is coded in as the background image by default, so if you select another language, it will still show the flag of your default language. I implemented some PHP to allow the other content on the page to change depending on the language selected (thanks to another tutorial), but I don't know how to figure it out for the background image, since that's done inside a CSS file and it does not seem easy to make PHP interact with that.

  • @ethiopiakinfemichael5677
    @ethiopiakinfemichael5677 3 ปีที่แล้ว

    very very very amazing!!!!!!

  • @齊欣企業
    @齊欣企業 3 ปีที่แล้ว

    thanks very much

  • @Bigboibremmer
    @Bigboibremmer 3 ปีที่แล้ว

    Thank you

  • @pip6903
    @pip6903 2 ปีที่แล้ว

    Don't Use English As US Flag

  • @lovefliymon9912
    @lovefliymon9912 ปีที่แล้ว

    топ

  • @al_2_1_6
    @al_2_1_6 3 ปีที่แล้ว

    🇮🇶🤗thank you

  • @juliusparajos4173
    @juliusparajos4173 3 ปีที่แล้ว +1

    that site is such a BS with those flags how the hell do I know which flag has what code ??? i cant find it

    • @igorsbondarevs8717
      @igorsbondarevs8717 3 ปีที่แล้ว

      description

    • @juliusparajos4173
      @juliusparajos4173 3 ปีที่แล้ว

      @@igorsbondarevs8717 what description ?? I dont want de source code, on the page where are the flags there is no option to see for ex if a slovakian flag has what code...

    • @igorsbondarevs8717
      @igorsbondarevs8717 3 ปีที่แล้ว

      @@juliusparajos4173 ur blind

  • @BoydKelly
    @BoydKelly 2 ปีที่แล้ว

    Bad example. Flags reprent countries not languages. There can be several official lanaguges in a country. A given language can be spoken in many countries. This just doesn't work. Its culturally obnoxious, and offending.

    • @SvidetelK
      @SvidetelK 9 หลายเดือนก่อน +1

      Bruh

    • @Phagocytosis
      @Phagocytosis 7 หลายเดือนก่อน

      That seems a bit overly sensitive. Most sources do it this way, and for most major languages, you can probably choose a country that has that particular language as its only official language. And anyway, what would be the alternative? Languages themselves don't typically have flags or other clearly recognizable symbols associated with them.

  • @VisionartoStudios
    @VisionartoStudios 9 หลายเดือนก่อน

    How do I add both HTML and CSS INTO a Google Site? I am a newbie into webpage creation and it seems to only work the HTML code