Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How do I keep text formatting when using Google Translate?

Posted on 2013-11-12
5
Medium Priority
?
1,884 Views
Last Modified: 2013-11-12
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
0
Comment
Question by:jwleys
  • 3
  • 2
5 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 39643465
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
 

Author Comment

by:jwleys
ID: 39643503
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
 
LVL 82

Accepted Solution

by:
leakim971 earned 1500 total points
ID: 39643545
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
 

Author Comment

by:jwleys
ID: 39643626
Good suggestion, seems to work and diverts the problem to being a data issue rather than a programming issue which I like :)
0
 

Author Closing Comment

by:jwleys
ID: 39643633
Thanks for your help
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question