source: trunk/docx4j/docs/HOWTO_translate.txt @ 1137

Revision 1137, 1.2 KB checked in by jharrop, 23 months ago (diff)
Line 
1Procedure for saving a translated web page.
2
3First, make sure your source document doesn't contain any dodgy characters: all your tools need to be UTF-8 capable.  I recommend using SC UniPad, since it will let you know whether there are any problems, and you can configure it to convert any dodgy characters to the U-FFFD replacement character.
4
5I used the Google Translate toolbar in Chrome to convert my source page.
6
7Now the tricky bit: how do you save the resulting HTML?
8
9In Chrome, right click to inspect element, then you can copy the HTML element, and paste it into SC UniPad.
10
11Make sure this document has a suitable XML declaration:
12
13<?xml version="1.0" encoding="UTF-8"?>
14<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
15  "http://www.w3.org/TR/html4/loose.dtd">
16
17Now the document will display in your browser, but the original text popups don't work.  Those aren't stored in the document, but rather, look like they are retrieved on the fly from Google.  So you may as well delete the Google Javascript from your HTML source (at the top and the bottom).
18
19Also, there's a lot of redundant CSS which you can remove via search/replace.
20
21Stick @lang="" on the html tag
Note: See TracBrowser for help on using the repository browser.