How to control Figma headlines/copy with new line characters in Crowdin strings

I’m creating localized images/screenshots using Figma/Crowdin… the plugin has been a huge time saver! One issue I noticed is that it can be hard to control layouts in Figma with longer translations.

I was hoping that a newline character (such as “\n”) in Crowdin would translate to a new line in Figma, so we could control layout in more detail. It doesn’t seem to work in testing with “\n”, but if anyone knows a way to send a new line (“enter” key) character through to Figma from a Crowdin string, please let me know.

As a workaround, it’s possible to do a Find/Replace in Figma to convert a string (such as “\n” or “
”) to an actual new line, by entering “Shift + Enter” in the replace field in Figma. Hope this helps someone!

Tom

1 Like

Hello Tom, glad to find a workaround here. I don’t think the native \n would work because Figma files are converted in Crowdin into HTML, and as I know no localisation tool support natively with a nice preview and convertation the .Fig files. How big is yours strings? In Crowdin should be a string character limit, one for preview in Editor, and another for exact string lengths.

How big is yours strings?

2 Likes

You don’t need to add any \n characters in your translation. Just add a new line (by pressing Enter key) while translating the string in Crowdin Editor. After translation sync back to Figma - the text field will have the corresponding newline (it works for both the Strings and Pages modes)

3 Likes

@andrii-bodnar You’re right! Thanks for explaining that, I’m doing everything with JSON (which normally uses \n) so I hadn’t thought about just hitting Enter. Tested and working. We’re converting an iPhone/Android app with about 50 screenshots per language (where each screenshot has a headline of 1 or 2 lines). The Figma plugin is a big help.

1 Like

@tommclellan thanks for the update! You use the plugin’s “Strings” tab to add strings from Figma to the JSON file in Crowdin, right?

1 Like

Actually I use the strings tab to pull strings from crowdin into Figma, for generating localized copies of Figma pages in each language. Much easier than manual editing!

3 Likes

By the way @andrii-bodnar @Dima my team compliments the Figma plugin v45 that you released January 26. They say it finally brings possibility to edit plural strings, which is very nice one. Keep in that way!

3 Likes