Skip to main content
Daniel_Marcos
New Member
Jul 3, 2023 11:24 AM UTC

Allow break lines in string variables

I’m trying to localize an app using the new variables feature but it looks like I can’t add break lines to the string.
For titles, especially in some languages like Japanese where there are no spaces, it is totally necessary.

Is this planned for the near future?

22 replies

David_Clayton
Jul 31, 2023 5:59 AM UTC

I would also love this feature, I’m trying to error messages in multiple languages and we really need line breaks!

chanwen
Aug 14, 2023 4:37 PM UTC

Agree, I would love this feature, too. This is critical for marketing-related materials in character-based languages such as Chinese and Japanese. Otherwise, some key phrases might be wrapped accidentally into two lines and cause confusion when reading.

Borys_Sviet
Aug 16, 2023 9:09 AM UTC

@Daniel_Marcos
There is a workaround this issue. Before pasting text into variable input, put it aside as plain text, make a break line with shift + enter shortcut, then copy and paste this text to the variable input

Daniel_Marcos
New Member
Aug 28, 2023 10:00 AM UTC

Thank you Borys for the tip! It works great!!

Nov 26, 2023 10:00 AM UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

rahend
Active Member
Mar 6, 2024 8:50 AM UTC

Continuing the discussion from Allow break lines in string variables:

The approach from @Borys_Sviet did not cover the paragraph spacing. What I’m trying is to handle paragraphs in multi-language using variables, so sometimes I need to break lines and add a paragraph space to them.

Jason_Thompson
New Participant
Apr 5, 2024 10:41 PM UTC

Doing two line breaks (eg; old skool HTML where we did

) seems to work and give a simulated paragraph break. You’d do SHIFT-Enter twice.

rahend
Active Member
Apr 18, 2024 7:05 AM UTC

Yes indeed @Jason_Thompson, but it doesn’t work with paragraph spacing properties. doesn’t it?

Brian_Nail1
May 10, 2024 4:31 PM UTC

This workaround didn’t work for me. It ended up looking like this and failing to insert the line breaks.
image

Benjamin18
New Member
May 20, 2024 3:42 PM UTC

Inserting a UNICODE paragraph Separator (U+2029) into the variable string works here:

  • Figma desktop app: 116.15.15
  • macOS 14.5