Create a line break on text in translation page

New Member
3 0 0

Hello :)
I am customizing the text in the checkout, specifically over the "customer notes" section and over the "finalize payment" button.  I have managed to do this by editing the language translation page. I would like to add a line break in my text since there is a lot of shipment information but I have not managed to do so. 

 

In the code (locales --> es.json) I have tried:
\n (neither appears nor creates a new line)
 

<br/>  (appears in plain text)

 

How can I add a line break here? 
The text is all in a block and currently difficult to read. My customers need to tell me a shipment time that works for them since it is only local deliveries. 

Thank you!

0 Likes
Highlighted
Shopify Partner
5 0 0

Hey there

 

Once you have `\n` in your translation file, on your template when you're typing out the code you need to add '| newline_to_br' to your output tag.

 

It'll look something like this: {{ 'whatever.your.path.is' | t | newline_to_br  }}

 

 

0 Likes