Jump to content

Weglot button placement

Go to solution Solved by Parker_SQSP,

Recommended Posts

  • Replies 19
  • Views 3.5k
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 year later...
  • Solution

Hi all, 

I'm Parker and I work on the Customer Operations team at Squarespace. I came across this thread, and I wanted to let you know that we now have an official integration with Weglot. With the integration, the language switcher button now lives in the site header. 

You can edit the appearance of the button (text only, icon & text, flag & text) from your header's style settings. 

Here's some more on that and the integration in general: 

https://support.squarespace.com/hc/en-us/articles/205809778-Creating-a-multilingual-site-in-Squarespace#toc-customize-the-language-switcher

Link to comment
  • 4 weeks later...
19 hours ago, jesswp said:

Hi @tuanphan (or anyone else that can assist!)

I am wondering if you can help me move the Weglot translator to my secondary nav where the green bar is instead. Right now it's positioned right next to the CTA button in the primary nav. I am in Fluid Engine.

Thanks!

https://flute-herring-aws3.squarespace.com/
pass: art

Move this?

image.thumb.png.c02530fe923996ea06b75b55cb83268d.png

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
10 hours ago, jesswp said:

Hey @tuanphan! Just wanted to see if you have an update for this by chance. Hope you are having a great weekend.

Add to Last line in Code Injection > Footer

<script>
  $(document).ready(function() { 
		$('.header-display-desktop .header-actions.header-actions--right').clone().appendTo('div#wm-subnav>nav');
	});
</script>
<style>
  div#wm-subnav .header-actions-action.header-actions-action--cta {
    display: none;
}
</style>

 

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
On 9/4/2022 at 10:48 PM, tuanphan said:

Add to Last line in Code Injection > Footer

<script>
  $(document).ready(function() { 
		$('.header-display-desktop .header-actions.header-actions--right').clone().appendTo('div#wm-subnav>nav');
	});
</script>
<style>
  div#wm-subnav .header-actions-action.header-actions-action--cta {
    display: none;
}
</style>

 

It seems to be appearing in both places now? @tuanphan

It also seems like it's cut off when viewing incognito mode.


image.thumb.png.824fb359a1b2a8ba768352f0c83e06ad.png

image.thumb.png.7a77a26d14957cbab0832e7e2191a34f.png

Edited by jesswp
Link to comment
On 9/6/2022 at 8:29 PM, jesswp said:

It seems to be appearing in both places now? @tuanphan

It also seems like it's cut off when viewing incognito mode.


image.thumb.png.824fb359a1b2a8ba768352f0c83e06ad.png

image.thumb.png.7a77a26d14957cbab0832e7e2191a34f.png

Add this code under code I sent

<style>
  .header-display-desktop .header-actions.header-actions--right>div.language-picker {
    display: none;
}
</style>

and try checking to see if language picker still works properly or not.

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
4 hours ago, tuanphan said:

Add this code under code I sent

<style>
  .header-display-desktop .header-actions.header-actions--right>div.language-picker {
    display: none;
}
</style>

and try checking to see if language picker still works properly or not.

 

Hi @tuanphan

 It still seems to be cutting off unfortunately when I am in incognito mode. See video attached! 

 

Link to comment
  • 1 year later...
On 11/1/2023 at 7:06 PM, STRANA said:

Hi! Maybe you also can help me @tuanphan?

I would like to move the language widget to the right of the button or to the announcement bar. I have tried some codes but it dosent work.

Is it also possible som change to only have the flag or EN/SV?

Skärmavbild 2023-11-01 kl. 13.00.46.png

What is your site url?

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
  • 4 weeks later...

Hi @tuanphan!

Would you be able to help me as well?

1. I copied your HTML codes above, but my login icon also switches place with the language selector... I would like it to stay ONLY in the main navigation on the left of the button.

2. Also, I would like to hide the secondary nav on mobile.

3. Is it possible to only show the FR/ENG flags instead of the actual icon and text?

Thanks alot!

https://snail-ray-daxz.squarespace.com/
pass: freelance

Link to comment
On 11/28/2023 at 12:35 AM, abbiericher said:

Hi @tuanphan!

Would you be able to help me as well?

1. I copied your HTML codes above, but my login icon also switches place with the language selector... I would like it to stay ONLY in the main navigation on the left of the button.

2. Also, I would like to hide the secondary nav on mobile.

3. Is it possible to only show the FR/ENG flags instead of the actual icon and text?

Thanks alot!

https://snail-ray-daxz.squarespace.com/
pass: freelance

#1. You mean move this?

image.thumb.png.9852a8703b7c7410685f213e500dffc6.png

#2. You can use this CSS code (this code include mobile + tablet)

/* Hide secondary nav */
@media screen and (max-width:991px) {
div#wm-subnav {
    display: none !important;
}
}

#3. I see you figured it out?

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
7 hours ago, tuanphan said:

#1. You mean move this?

image.thumb.png.9852a8703b7c7410685f213e500dffc6.png

#2. You can use this CSS code (this code include mobile + tablet)

/* Hide secondary nav */
@media screen and (max-width:991px) {
div#wm-subnav {
    display: none !important;
}
}

#3. I see you figured it out?

1. I meant the green icon for login, but I figured it out! Thanks!

2. Great. Exactly what I needed!

3. Yes! But my client finally wants only FR/ENG to appear. Not the whole word (Francais/English) or the flags. Do you know how to change that with Weglot? Also, is it possible to move the language dropdown menu in front of the button? 

Big thanks! 🙂

Link to comment
On 11/29/2023 at 10:07 PM, abbiericher said:

1. I meant the green icon for login, but I figured it out! Thanks!

2. Great. Exactly what I needed!

3. Yes! But my client finally wants only FR/ENG to appear. Not the whole word (Francais/English) or the flags. Do you know how to change that with Weglot? Also, is it possible to move the language dropdown menu in front of the button? 

Big thanks! 🙂

Use this CSS code

.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="fr"] .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="fr"] .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;
}

image.png.c374eaec9de347b4f4f6a97c2c04ccd6.png

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

Try this new code

/* on English */
html[lang*="en"] div.language-item:nth-child(1) a span {
    font-size: 0;
}
html[lang*="en"] div.language-item:nth-child(1) a span:before {
    content: "EN";
    font-size: 16px;
}
html[lang*="en"] div.language-item:nth-child(2) a span {
    font-size: 0;
}
html[lang*="en"] div.language-item:nth-child(2) a span:before {
    content: "FR";
    font-size: 16px;
}
/* on FR */
html[lang*="fr"] div.language-item:nth-child(1) a span {
    font-size: 0;
}
html[lang*="fr"] div.language-item:nth-child(1) a span:before {
    content: "FR";
    font-size: 16px;
}
html[lang*="fr"] div.language-item:nth-child(2) a span {
    font-size: 0;
}
html[lang*="fr"] div.language-item:nth-child(2) a span:before {
    content: "EN";
    font-size: 16px;
}

 

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.