Jump to content

Changing "Back" to native language

Recommended Posts

Posted

Site URL: http://www.elivery.no/

Hi. I need help changing the text/button showing "Back" on mobile version of our site, to native Norwegian.
Take a look at attached image.

I contacted Squarespace Support, but they could not help med and wrote: "So we don't have the functionality for this built in text to translate into Norwegian currently. You may be able to do this with some custom code."

Can anybody help me out please? 

Skjermbilde 2020-06-03 kl. 15.31.23.png

  • Replies 15
  • Views 1.2k
  • Created
  • Last Reply
Posted

Add to Home > Design > Custom CSS

.header-menu-nav-folder-content .header-menu-controls span:last-child {
    visibility: hidden;
    position: relative;
}
.header-menu-nav-folder-content .header-menu-controls span:last-child:before {
    visibility: visible;
    content: "new back text";
}

 

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!)

Posted

Great and thanx for help tuanphan 🙂 
After I implemented the CSS i see that the "new back text" goes slitly to the left. What do I have to write to place it at the center?

Posted

This line of jQuery will find the span with "Back" and replaces it with "Tilbake"

$( "span:contains('Back')" ).html("Tilbake")

  • 1 year later...
Posted
On 6/24/2020 at 1:17 AM, rwp said:

This line of jQuery will find the span with "Back" and replaces it with "Tilbake"

$( "span:contains('Back')" ).html("Tilbake")

Hi rvp. 
I have the same issue but I have no experience with coding at all!
Where do I put that $( "span:contains('Back')" ).html("Tilbake") line. If I put it in the custom CSS it returns with a syntax error?.
Thanks!

/Bo

Posted
On 6/3/2020 at 8:49 PM, Dragoslav said:

Site URL: http://www.elivery.no/

Hi. I need help changing the text/button showing "Back" on mobile version of our site, to native Norwegian.
Take a look at attached image.

I contacted Squarespace Support, but they could not help med and wrote: "So we don't have the functionality for this built in text to translate into Norwegian currently. You may be able to do this with some custom code."

Can anybody help me out please? 

Skjermbilde 2020-06-03 kl. 15.31.23.png

Hi Dragoslav.
Did you ever solve this issue?. I have the same problem...

/Bo

Posted

@Heidelberg

Expanding on rwp's solution a bit.

Add the following to Design > Custom CSS.

.header-menu-controls-control span:last-child {

  display : none;
  
  }

Add the following to Settings > Advanced > Code Injection > HEADER.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

Add the following to Settings > Advanced > Code Injection > FOOTER.

<script>

  $( ( ) => {
  
    /*
    
      begin change mobile menu back text
      
      Version       : 0.1d0
      
      SS Version    : 7.1
      
      Dependancies  : jQuery
      
      By            : Thomas Creedon < http://www.tomsWeb.consulting/ >
      
      */
      
      const text = '[enter back text here between single quotes]';
      
      // do not change anything below, there be the borg here
      
      $( '.header-menu-controls-control span:contains("Back")' )
      
        .css ( 'display', 'inline-block' )
        
        .text ( text );
        
      // end change mobile menu back text
      
      } );
      
  </script>

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.

Posted
30 minutes ago, creedon said:

@Heidelberg

Expanding on rwp's solution a bit.

Add the following to Design > Custom CSS.

.header-menu-controls-control span:last-child {

  display : none;
  
  }

Add the following to Settings > Advanced > Code Injection > HEADER.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

Add the following to Settings > Advanced > Code Injection > FOOTER.

<script>

  $( ( ) => {
  
    /*
    
      begin change mobile menu back text
      
      Version       : 0.1d0
      
      SS Version    : 7.1
      
      Dependancies  : jQuery
      
      By            : Thomas Creedon < http://www.tomsWeb.consulting/ >
      
      */
      
      const text = '[enter back text here between single quotes]';
      
      // do not change anything below, there be the borg here
      
      $( '.header-menu-controls-control span:contains("Back")' )
      
        .css ( 'display', 'inline-block' )
        
        .text ( text );
        
      // end change mobile menu back text
      
      } );
      
  </script>

Let us know how it goes.

Hi Creedon.

Aw snap! Code injection is a Premium feature and my customer is a bit cheap... But THANK YOU VERY MUCH anyway - I may use this on other sites or maybe even force him to pay up. 🙂

I have two other questions:
1) Is there a way to make the text a bit smaller on mobile only?.

2) Is there a way to change the text in the forms under the name fields?. (please see attached screen).

/Bo

Untitled-1.jpg

Posted
1 hour ago, Heidelberg said:

Aw snap! Code injection is a Premium

You could try the CSS only solution earlier in the thread but there is an issue with the alignment which I didn't see an immediate solution to.

Quote

1) Is there a way to make the text a bit smaller on mobile only?

Are you wanting to change the size of all menu items on mobile or just Back?

Quote

2) Is there a way to change the text in the forms under the name fields?

Please see the following. It is not specific to your need but could be adapted. You would need to change the block id and trim out the unneeded CSS for the fields you don't want to change.

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.

Posted
49 minutes ago, creedon said:

You could try the CSS only solution earlier in the thread but there is an issue with the alignment which I didn't see an immediate solution to.

Are you wanting to change the size of all menu items on mobile or just Back?

Please see the following. It is not specific to your need but could be adapted. You would need to change the block id and trim out the unneeded CSS for the fields you don't want to change.

Let us know how it goes.

Yes but I don't want that alignment issue.

I want to be able to adjust size of all the text in the menu. And preferably change 'Back' to 'back' at least maybe..?

Awesome! Where do I locate the correct Block ID?.

Thanks again Creedon!

Posted
30 minutes ago, Heidelberg said:

I want to be able to adjust size of all the text in the menu. And preferably change 'Back' to 'back' at least maybe..?

Add the following to Design > Custom CSS.

.header-menu-controls { /* mobile, lowercase navigation menu back link */

  text-transform : lowercase;

  }

.header-menu-nav-item a { /* mobile, make navigation menu font smaller */

  font-size : calc( 8.5vmin / 1.25 );
  
  }

 

Quote

Where do I locate the correct Block ID?

Check out Heather Tovey's most excellent looking Squarespace ID Finder.

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.