Use this dialog to control how memoQ imports HyperText Markup Language (HTML) documents, also known as web pages. memoQ also supports the HTML 5 format.
How to begin
In the Translations pane of Project home, choose Import > Import with options button on the Documents ribbon tab, and in the Open dialog, locate and select a HTML file (with the .htm or .html extension). On the Html config tab, configure the HTML import settings. If you also import PHP, use also the Php config tab for configuring the Php import options.
Options
memoQ has two HTML filters. The default filter works with inline tags, showing you the content of the HTML tags. The other filter imports HTML tags as uninterpreted formatting tags. You can choose between these two filters. The settings are different for the two filters.
•Select import type: Use this radio button to choose between the two filters: Import markup as inline tags or Import markup as memoQ tags. The settings are different for the two filters.
Import markup as inline tags filter options
•Ignore content of drop-down lists: Check this check box to ignore the content of drop-down lists in the HTML code. •Import non-breaking spaces as entities: Check this check box to import a non-breaking space as an inline tag rather than the corresponding character. •Enforce empty <img/> and <br/> tags: Check this check box to treat old-style <img> and <br> tags as empty tags. Normally, these would be imported as opening tags, but with this setting memoQ will import them as XML-style empty tags in all cases – so you won't get rogue XML warnings when confirming segments in the document. •Treat <br/> tags as inline: Check this check box to import br-Tags as Inline-Tags. Inline-Tags do not cause a line break as br-Tags do. •Import access keys: Check this check box to import and localize also the access keys, the keyboard commands that give focus to an element in HTML. •Import HTML entities as characters: Check this check box to import the entities in HTML as normal characters. Disabling this check box imports HTML entities as inline tags. •Always use HTML entities in export: Check this check box to export every character that has an HTML entity as an entity. Disabling this check box will only export those characters as HTML entities that are not on the export code page. •Break segment at preserved newline characters: Check this check box to make memoQ start a new segment whenever it encounters a newline character in the HTML text, so that the newline character will be preserved in all cases. •Import processing instructions as inline tags: Check this check box to import processing instructions as inline tags. Processing instructions like <$ are now represented with uninterpreted tags. This check box is enabled by default. XML processing instructions were previously handled as {} tags, now they have a special tag: mq:pi. •Import codepage if not specified: This drop-down list specifies the code page for interpreting the input document if the document does not say the codepage. •Use this codepage even if there is a different declaration in the file: Check this check box to enforce the import codepage selection. Use this when you suspect that the encoding declaration in the HTML file is incorrect or inconsistent. This check box is not checked by default. •Export codepage: This drop-down list specifies the code page for exporting the target file. •Edit list of excluded tags: Displays the Edit list of excluded tags dialog, where you can specify HTML tags whose content is not to be translated. For example, you might want to exclude the contents of the <title>...</title> tag from the translation. In this case, you need to list the title tag in this dialog:
To add a tag to the list, type its label in the text box below the list, and click the button with the plus sign. To remove a tag from the list, select the tag in the Excluded tags list, then click the button with the minus sign. To save the list, click OK. To exit the dialog without saving changes to the list, click Cancel.
|
Import markup as memoQ tags filter options
•Show HTML comments: Check this check box to import HTML comments into the project for translation. Use this option if you want to translate notes in the HTML code, invisible in the resulting webpage. •Import new line characters as tags: Check this check box to insert newline characters from the HTML document as tags into the translation project. These characters only change the layout of the HTML code, not the resulting webpage, so they may usually be ignored. •Ignore content of drop-down lists: Check this check box to not offer the possible values of drop-down lists for translation. The rationale behind this option is that some drop-down lists only contain numbers or codes that don't need to be translated. •Import non breaking spaces as tags: Check this check box to insert non breaking spaces from the HTML document as tags into the translation project. These characters only change the layout of the HTML code, not the resulting webpage, so they may usually be ignored.
|
If you import an HTML document without invoking this dialog, HTML comments, if any, are not imported and newline characters are ignored. Drop-down lists, however, are imported.
When you import a HTML 5 document, memoQ recognizes the translate attribute that explicitly marks element as translatable or non-translatable:
•If there is a “yes” value on any element, it will be imported as translatable, even if it is non-translatable according to the built-in filter configuration (defined non-translatable by the filter configuration, or as the child of a non-translatable element). •If there is a “no” value on an element, it will not be imported as translatable, even if it is translatable according to the built-in filter configuration. Note: The lang attribute can be present on HTML elements to specify the language of the content. memoQ supports the lang attribute: When you export the document, memoQ changes the lang attribute to the language code of the target language of the memoQ translation document for the parts that were actually processed by memoQ (imported for translation). The language code is only changed if the original code matched the source language of the project. If a part of the document was marked up as Japanese in an otherwise English document, memoQ assumes it was on purpose. The matching ignores sublanguages, e.g., English and English US are not considered different.
For HTML 5:
Since HTML 5, HTML elements can have a translatable attribute with a "yes" or a "no" value. The memoQ HTML filter behaves the following for the translate attribute:
•If the value is "yes", it is imported as translatable content, even if it is non-translatable according to the built-in filter configuration. •If the value is "no", it is not imported as translatable, even if it is translatable according to the built-in filter configuration. See also the W3C site here.
The memoQ HTML filter behaves the following for the lang attribute to specify the language of the content:
•On export, the lang attribute is changed to the language code of the target language of the memoQ translation document that was imported for translation. •The language code is only changed if the original code matched the source language of the project. For example you marked a part of a document as e.g. Japanese in an otherwise English document. •The matching ignores sublanguages, e.g. English and English-US. They are not considered different.
|