Jump to content

Hi. I'm trying to put a multilingual button EN | FR on the top of my mobile site.

Recommended Posts

Try this code to Website Tools (under Not Linked) > Custom CSS

@media screen and (max-width: 992px) {
.header-display-desktop {
    display: flex;
    justify-content: center;
}
.header-display-desktop .header-burger, .header-display-desktop .header-title-nav-wrapper,
.header-display-desktop .header-actions-action--cart{
    display: none;
}
.header-actions.header-actions--right {
    display: flex;
    flex: 1 1 100% !important;
    max-width: unset !important;
}
.header-display-desktop .language-picker-desktop {
    display: block;
    margin: 0 auto;
}
.header-inner {
    flex-direction: column;
}
.language-picker-content {
    position: static !important;
    opacity: 1 !important;
    pointer-events: all !important;
    display: flex;
    justify-content: flex-end;
}
.header-actions .language-picker-desktop .current-language {
    display: none !important
}
html[lang*="fr"] .language-item:nth-child(1) span {
    font-weight: 600;
}
html[lang*="en"] .language-item:nth-child(2) span {
    font-weight: 600;
}
.header-actions .language-picker-desktop .language-item:first-child:after {
    content: "/";
    display: inline-block;  
    padding-left: 2px;
    padding-right: 2px;
    font-size: 20px;
}
.header-actions .language-picker-desktop .language-item {
    display: flex;
    flex-direction: row;
}
.header-menu-actions.language-picker.language-picker-mobile {
    display: none
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks later...

Try this CSS code

@media screen and (max-width:991px) {
.header-actions  .language-picker-content .language-item:nth-child(1) span:after {
   content: 'FR';
    font-size: 12px
}
.header-actions  .language-picker-content .language-item:nth-child(2) span:after {
   content: 'EN';
    font-size: 12px
}
.header-actions  .language-picker-content  .language-item span {
    font-size: 0
}
html[lang*="en-"]
 .language-picker .current-language-name, [lang="es"] .language-picker .current-language-name  {
     font-size: 0 !important
}
html[lang*="en-"]
 .header .language-picker .current-language-name:after {
     content: 'EN';
    font-size: 12px !important
}
[lang="es"] .language-picker .current-language-name:after {
     content: 'FR';
    font-size: 12px !important
}
.header-actions .language-picker-desktop .language-picker-content {
   padding-left: 0;
   padding-bottom: 0
}

.header .language-picker-content a {
    justify-content: center;
}
div#multilingual-language-picker-desktop {
 margin-left: 0 !important;
}

.language-picker-content {
    justify-content: flex-start !important;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.