Jump to content

Multilingual Website and Mobile version of the website

Recommended Posts

Site URL: https://www.skill-up.nu/

Hi!

1- We have created a website that has Dutch as the main language and English as a second language. We would like to make it possible for people on the dutch pages to be directed to the contact form in dutch when pressing the “contact” button on the header and vice versa for the English page. 
Could someone please help us achieve that? 

I have tried using previously shared codes however, I always get a syntax error :( 
2- On the Dutch version of our contact form, under the name space I can’t alter the text “First name” and “Last name”, I would like this to be in Dutch. Does someone know a solution?

3- I used this code to resize my logos on the “home” page and wanted to use it again for the images on the “about us'' page. But that doesn’t work, how can I use the same code twice? I want to resize the image only on the mobile version of the website, where they are too small. 
@media only screen and (max-width:640px){.sqs-block-image{width:40%;margin: auto}}

Any help or suggestions will be very appreciated!

Link to comment
  • Replies 2
  • Views 422
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

I may be able to help with item one.

Please see the following.

You'll need to install the script before the language code. Otherwise the language code won't be able to do it's magic to the buttons.

Then to the language code add the following below the /* ADD LANGUAGE CLASSES */ section of code.

$('.header-actions-action--cta a:link:not([href^="http://"]):not([href^="https://"])').each(function () {
      var langType = $(this).attr('href').split("/")[1];
      var multiLanguageClass = 'multilanguage lang-' + langType + '';
      if (undefined !== langType && langType.length <= 2) 
        $(this).addClass(multiLanguageClass).parent().addClass(multiLanguageClass);
    });

So this...

    });

    /* HOMEPAGE-LOGO LINKS TO PROPER LANGUAGE HOMEPAGE */

...becomes...

    });
    $('.header-actions-action--cta a:link:not([href^="http://"]):not([href^="https://"])').each(function () {
      var langType = $(this).attr('href').split("/")[1];
      var multiLanguageClass = 'multilanguage lang-' + langType + '';
      if (undefined !== langType && langType.length <= 2) 
        $(this).addClass(multiLanguageClass).parent().addClass(multiLanguageClass);
    });

    /* HOMEPAGE-LOGO LINKS TO PROPER LANGUAGE HOMEPAGE */

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

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.