How do I keep text formatting when using Google Translate?

Hi,

I am new to using Google Translate and I have found that it strips breaks <br /> when text is translated. Is there a way I can stop this from happening so that the text can retain its original formatting.

Example:
http://www.educationpages.co.nz/55-Intermediate/Murrays-Bay-Intermediate-11263/View-details.html
Jeremy LeysTechnical LeadAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
leakim971Connect With a Mentor PluritechnicianCommented:
IMHO it's normal for Google to remove linebreak before translating a text because sentence will not have the same length.

English (not the br at the end)
be or not to be be or not to be be or not to be<br />
be or not to be be or not to be be or not to be<br />
be or not to be be or not to be be or not to be<br />
be or not to be be or not to be be or not to be<br />

French :
être ou ne pas être être ou ne pas être être ou ne pas être<br />
être ou ne pas être être ou ne pas être être ou ne pas être<br />
être ou ne pas être être ou ne pas être être ou ne pas être<br />
être ou ne pas être être ou ne pas être être ou ne pas être<br />
être ou ne pas être être ou ne pas être être ou ne pas être<br />

I don't know any hack. Did you try to replace <br /> by a <div></div>
0
 
leakim971PluritechnicianCommented:
no, I see lot of people complaining about that and there's no solution as there's no such setting to apply :
https://translate.google.com/manager/website/settings
0
 
Jeremy LeysTechnical LeadAuthor Commented:
I wonder if anything can be applied at an API level or if anyone has any hacks that work including supplementing <br /> for <p> etc ...

Thanks for your input though it is much appreciated.
0
 
Jeremy LeysTechnical LeadAuthor Commented:
Good suggestion, seems to work and diverts the problem to being a data issue rather than a programming issue which I like :)
0
 
Jeremy LeysTechnical LeadAuthor Commented:
Thanks for your help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.