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?

10 Likes

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

2 Likes

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.

@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

10 Likes

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

1 Like

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

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.

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.

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

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

1 Like

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

  • Figma desktop app: 116.15.15
  • macOS 14.5

Apple’s IDE, Xcode, handles this well in its Strings catalogs using an alt-return. A multiline browser would be a nice touch too.

The interface looks like this:

This works, but the result is different to a real paragraph spacing.
And I hate Figma for stupid work arounds like this :exploding_head:

Indeed, we need a real thing than an approach look-a-like