balazs-endresz / jquery-translate

Automatically exported from code.google.com/p/jquery-translate
5 stars 5 forks source link

Line breaks not recognized when translating text from a textarea #68

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
jquery-translate version: 1.4.7
jQuery version: 1.5.2
browser: firefox 4.0.1
OS: Win 7

What is the expected output? What do you see instead?
I expect that the line breaks are submitted to the translated text when the 
translation is finished. But it is just one whole block of text. No single line 
break.

How to solve this problem?

It is a great plugin, I am using it now for 2 months and I am still exited!

Original issue reported on code.google.com by kees...@cannect.nl on 25 May 2011 at 9:29

GoogleCodeExporter commented 9 years ago
To solve my own issue:
var nl = /\n|\r|\r\n/
textToTranslate = textToTranslate.replace(nl, '<br />');

Thanks!

Original comment by kees...@cannect.nl on 25 May 2011 at 9:49