Find and replace with new line

Hi all,

I got many JSON files that were imported to Crowdin and contain many strings like this:

{...
"some-identifier": "This is a text with\\n a new line\\!",
...}

The issue is \\n and \\!. After import, Crowdin displays the string like this:
This is a text with\n a new line\!

Which is expected and not the fault of Crowdin. I’d like to replace “!” now with just “!” and “\n” with an actual line break instead the literal “\n”. I do not want to do this on source level and reimport, since this would break the progress we have with the project. My goal is to fix this on Crowdin level, export it from there, and then fix it in our VCS.

I’m aware of the find and replace functionality in multilanguage editor and this should work great with the case of !. However, I cannot see an option to replace “\n” with an actual linebreak.

Do you have an idea how to fix this within Crowdin?

Thanks and best regards, Dominic

Hi Dominic,
In case you want to add the line break, it would be necessary to do it to the source file locally, and then update it in Crowdin

1 Like

Hi Tetiana,
This implies I have to rerun this for all translations as well, i.e., change it locally in the translation and upload translations similar to the sources?

Hi @dominicb

Unfortunately, adding new lines directly in Crowdin using the Find and Replace option is not possible. However, as my colleague suggested, you can add the line breaks in the local file and then update it in Crowdin. Additionaly, if you need your translations to include line breaks, you can manually adjust the translations and upload them to Crowdin.

1 Like