Jump to content

How to translate my form to Swedish

Go to solution Solved by NatureSwim,

Recommended Posts

  • Replies 2
  • Views 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

13 hours ago, chrizile said:

Hi i would like to translate my form to Swedish, 
I managed to translate most of it but i can't figure out how to translate the ones that remain in english https://www.natureswim.com/se/registrering-av-garanti

Screenshot 2023-11-17 at 19.48.44.png

Here is the code i have in my code block on this page

 

<style>
  /* First name */
  .field.first-name .caption-text {
    visibility: hidden;
  }
  .field.first-name .caption-text:before {
    visibility: visible;
    content: "Förnamn";
  }
  /* last name */
  .field.last-name .caption-text {
    visibility: hidden;
  }
  .field.last-name .caption-text:before {
    visibility: visible;
    content: "Efternamn";
  }

  /* 
  Hide required on field titles 
  Tip by sf.digital
  */
  .form-wrapper .react-form-contents .field-list .title .required,
  .form-wrapper .react-form-contents .field-list .fields .description.required {
    visibility: hidden;  
  }
  .form-wrapper .react-form-contents .field-list .title .required:before,
  .form-wrapper .react-form-contents .field-list .fields .description.required:before {
    visibility: visible;  
    content: " (obligatoriskt)"; /* Translation for "(required)" in Swedish */
    font-size: 1em;
    line-height: 1em;
  }
</style>
 

Link to comment
  • Solution
2 hours ago, chrizile said:

Here is the code i have in my code block on this page

 

<style>
  /* First name */
  .field.first-name .caption-text {
    visibility: hidden;
  }
  .field.first-name .caption-text:before {
    visibility: visible;
    content: "Förnamn";
  }
  /* last name */
  .field.last-name .caption-text {
    visibility: hidden;
  }
  .field.last-name .caption-text:before {
    visibility: visible;
    content: "Efternamn";
  }

  /* 
  Hide required on field titles 
  Tip by sf.digital
  */
  .form-wrapper .react-form-contents .field-list .title .required,
  .form-wrapper .react-form-contents .field-list .fields .description.required {
    visibility: hidden;  
  }
  .form-wrapper .react-form-contents .field-list .title .required:before,
  .form-wrapper .react-form-contents .field-list .fields .description.required:before {
    visibility: visible;  
    content: " (obligatoriskt)"; /* Translation for "(required)" in Swedish */
    font-size: 1em;
    line-height: 1em;
  }
</style>
 

looks like i managed to answer my own question 

 

<style>
  /* First name */
  .field.first-name .caption-text,
  .field.last-name .caption-text {
    visibility: hidden;
  }

  .field.first-name .caption-text:before {
    visibility: visible;
    content: "Förnamn";
  }

  .field.last-name .caption-text:before {
    visibility: visible;
    content: "Efternamn";
  }

  /* Hide required on field titles */
  .form-wrapper .react-form-contents .field-list .title .required,
  .form-wrapper .react-form-contents .field-list .fields .description.required {
    visibility: hidden;  
  }

  .form-wrapper .react-form-contents .field-list .title .required:before,
  .form-wrapper .react-form-contents .field-list .fields .description.required:before {
    visibility: visible;  
    content: " (obligatoriskt)"; /* Translation for "(required)" in Swedish */
    font-size: 1em;
    line-height: 1em;
  }
</style>
 
<style>  
  label[for="address-0c461f97-3d61-477b-b9b3-8567bfb81227-country-field"],
  label[for="address-0c461f97-3d61-477b-b9b3-8567bfb81227-line1-field"],
  label[for="address-0c461f97-3d61-477b-b9b3-8567bfb81227-line2-field"],
  label[for="address-0c461f97-3d61-477b-b9b3-8567bfb81227-zip-field"],
  label[for="address-0c461f97-3d61-477b-b9b3-8567bfb81227-city-field"] {
    visibility: hidden;
  }

  label[for="address-0c461f97-3d61-477b-b9b3-8567bfb81227-country-field"]::before {
    content: "Land";
    visibility: visible;
    font-size: 1.2em;
    line-height: 1em;
    margin-right: 5px; /* Adjust margin as needed */
  }

  label[for="address-0c461f97-3d61-477b-b9b3-8567bfb81227-line1-field"]::before {
    content: "Adressrad 1";
    visibility: visible;
    font-size: 1.2em;
    line-height: 1em;
    margin-right: -95px; /* Adjust margin as needed */
  }

  label[for="address-0c461f97-3d61-477b-b9b3-8567bfb81227-line2-field"]::before {
    content: "Adressrad 2";
    visibility: visible;
    font-size: 1.2em;
    line-height: 1em;
    margin-right: 5px; /* Adjust margin as needed */
  }

  label[for="address-0c461f97-3d61-477b-b9b3-8567bfb81227-zip-field"]::before {
    content: "Postnummer";
    visibility: visible;
    font-size: 1.2em;
    line-height: 1em;
    margin-right: -65px; /* Adjust margin as needed */
  }

  label[for="address-0c461f97-3d61-477b-b9b3-8567bfb81227-city-field"]::before {
    content: "Stad";
    visibility: visible;
    font-size: 1.2em;
    line-height: 1em;
    margin-right: -80px; /* Adjust margin as needed */
  }
</style>
 

Screenshot 2023-11-18 at 11.22.31.png

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.