CAT-Tools/MemoQ/Tips and Tricks

MemoQ
You probably want to create regular back-ups of your resources (projects, translation memories, term bases, settings, etc.) for disaster recovery. As MemoQ stores resources as files, it is fairly easy to create backups by simply copying folders or files. The below instructions let you create backups that you can quickly restore if your resources become corrupted. The backups created this way are not meant for "long term" usage though: trying to restore a backup created in an older version might cause problems.

Before backing up or restoring any files, make sure that MemoQ is not running. MemoQ might hold some files open or may even be writing into one of them, which might prevent a successful backup or restore.

You need to back up the following folders:

(In Windows Vista: C:\ProgramData\MemoQ) (In Windows Vista: C:\Users\(your username)\AppData\Roaming\MemoQ)
 * C:\Documents and Settings\All users\Application Data\MemoQ
 * C:\Documents and Settings\(your username)\Application Data\MemoQ
 * My Documents\My MemoQ Projects

(The above assumes that C:\ is the system drive.) For projects, translation memories, term bases, and filter configurations, the default storage paths can be changed in MemoQ under Tools > Options > Appearance, Locations. If you have changed the default paths for any of the above, make a backup of your new paths.

MemoQ Server
If you are using a server solution, it is also advisable to regularly back up the SQL database that contains information about the users, groups, permissions and projects. By default, it is found in the following folder, which also contains the project folder and some configuration files that you may also want to back up:

(In Windows Vista: C:\ProgramData\MemoQ Server)
 * C:\Documents and Settings\All Users\Application Data\MemoQ Server

The SQL database file and the transaction log are stored under the names MemoQServer.mdf and MemoQServer_log.ldf. Both are needed for a successful backup and restore. During the server installation you might have changed the path where the server database is stored. If you did change it, make sure that you back up the new path as well. The folder where server project documents are stored can also be changed from the Server Administrator, so if you are not using the default folder, back up the actual project folder as well.

Before the backup or restore operation, you will need to stop the MemoQ Server service and the service of the SQL Server instance pertaining to the MemoQ Server (in that order). Failure to do so may stop you from successfully finishing the operation, or might even leave the server in an unworkable state. After the backup or restore operation, start the SQL instance service and the MemoQ Server service (in that order) again.

Never try to restore a database backup if you have upgraded your server to a newer version since the backup was taken. The database schema often gets modified between versions, and a database created by an older version might not work with the current version of the server. If you need to restore a database that was created in an older version of MemoQ Server, you first need to uninstall you current version of MemoQ Server, and install the version the database was created in. After this, you can restore the backup of the database, and install the current version. The installer will upgrade the restored database to the current version.

License files
By following the above instructions, your backups might contain the license files of MemoQ and/or MemoQ Server. However, if there are frequent licensing related changes (e.g. you are using mobile licenses or have acquired new licenses recently), it might not be a good idea to restore earlier versions of your license files when you restore a backup. In this case, do not include the license files in your backup packages. (Or, if they are already backed up, do not restore them.) License files are named LicenseNN.dat (where N is a digit, e.g. License11.dat, License02.dat etc.). They can be found in the following folders:

MemoQ: (In Windows Vista: C:\ProgramData\MemoQ)
 * C:\Documents and Settings\All users\Application Data\MemoQ

and/or

(In Windows Vista: C:\Users\(your username)\AppData\Roaming\MemoQ)
 * C:\Documents and Settings\(your username)\Application Data\MemoQ

MemoQ Server: (In Windows Vista: C:\ProgramData\MemoQ Server)
 * C:\Documents and Settings\All Users\Application Data\MemoQ Server

If you have licensing problems after restoring a backup, update your licenses online first. To do this, click Activation (or Server Activation for the server) in the Help menu, and click Update licenses online. If this does not solve the problem, turn to Kilgray support.

Purge older (multiple) translations from the TM
Task: How to purge older translations in cases where there are multiple translations for a certain segment.

Solution: This is in fact possible in MemoQ, with or without a bit of trickery, depending on the settings of your TM.


 * 1) By default, a TM only allows one entry for the same source segment; this is a setting you can specify when you create the TM. You can also configure which entries will be kept: again, by default, the translation you commit later will overwrite the previous one. In this case, then, the issue of multiple translations does not exist in the first place.
 * 2) If your TM allows multiple translations and you want to purge it, there is also a way. When you open the TM for editing, you can specify filtering/sorting criteria. If you sort by entry date&time, and then export to TMX, the entries will be listed chronologically. Importing back into a TM that only allows a single translation will have the effect that only the most recent translations are kept.

This is perhaps not an extremely easy way; but again, perhaps if one chooses to allow multiple translations, this is also not what you want to do on a regular basis.

Working with TTX files using MemoQ 2.0 - alternate workflow
Recent versions of MemoQ (2.1 and above) have full support for TTX files, but for older versions, there is still a solution to work on TTX files. Here is how to proceed.

First of all, you will need to download a doc file, PlusToyz, containing Word macros and freely available from the Wordfast Yahoo group (in the Files section, at http://tech.groups.yahoo.com/group/wordfast/files). You have to join the group to be able to download that file.

Using any Web search engine, you may find several links to direct downloads, but 99% of them are old versions of this file and hence results wouldn't be guaranteed.

So, here is how to proceed:


 * Open the PlusToyz.doc file using Word
 * Use the bottom macro (TTX file to Trados-like segmented text) to convert your TTX file to word "Trados tagged" bilingual doc
 * Import the resulting tagged Word file using MemoQ, making sure to add tw4winMark as an excluded style (make sure you also check the External box)
 * Translate every *second* segment, leaving all "source" (first) ones blank
 * Once translation if finished and you are sure all due segments are properly confirmed, select Copy source to target where empty... from the Translation menu
 * Now that all segments are populated, press CTRL+SHIFT+A to select all segments and select Confirm without update from the Translation menu
 * You now have a fully exportable doc file (and proper TM, without useless source=source stuff)!
 * Export the document
 * Open the PlusToyz.doc Word file again
 * Select the Segmented text to TTX macro to convert your translated file back to TTX
 * Open the resulting TTX file using TagEditor and see by yourself, a properly translated file !

Please note that, although split/join operations during translation should not and may not alter the end result, it is better to restrain playing with it too much till we get large and solid reports that it won't affect the final TTX.

You can import DOCX files directly in current versions of memoQ.

Translating a docx file (Word 2007) using MemoQ
You can import a .docx file directly in current versions of memoQ.


 * Rename your .docx file and add the .zip suffix.
 * Open the new "zip" file, and you will see several folders. Browse to the Word folder and extract only the document.xml file, which contains the text of the document that you will need to translate
 * Start MemoQ and create a new project
 * Select Add document as and browse to the document.xml file
 * In the Document import settings dialog, you will have the XML filter already selected
 * We will now create an XML filter for DOCX documents. Later on, you'll just have to double click on it to select it
 * Click Manage XML formats to display the XML Format administrator dialog
 * Now select the Create new format option
 * Give a name to this brand new custom XML filter. Let's call it DOCX(Word2007)
 * Make sure Create from scratch is checked and click OK
 * In the XML format settings dialog, click Add file and browse to the document.xml file
 * Now select the Tags and attributes tab and click Populate. MemoQ will analyse the file and automatically cerate the proper tagging settings.
 * Click OK. You now have a proper DOCX xml filter. Click Close to close this window.
 * Now that you have an appropriate xml filter, double click on the custom DOCX(Word2007) filter.
 * The file is imported. You can now safely translate it using MemoQ.
 * Once translation is finished, just export the document.xml file
 * Replace the old document.xml in the .zip archive with the translated one
 * Rename the file to remove the .zip suffix and restore the former .docx extension

You now have a translated DOCX file!

Changing a TTX file source/target language using MemoQ 2.x and above
Sometimes, when your client sends you a TM using a specific source language (ex. EN-CA), you may import your TTX files into a project using another regional language (ex. EN-GB) only to discover later that, when you export the resulting TTX, the source language has changed! This may lead to problems, as TagEditor refuses to edit a TTX using language settings different than the TM it is currently associated with.

In fact, MemoQ sets the source and target language of your TTX files to those chosen for the current project. You may sometimes want to turn that to your advantage and deliberately chose whatever source and target language you see fit.

To do that, proceed as follows:

special note here: MemoQ defaults to EN-US if you chose only "English" without specifying the locale
 * export the translated TTX file(s) from your current project as MBD (MemoQ bilingual document)
 * create a new project using any source or target language you need.
 * import your MBD files into this new project
 * select all segments and copy source text to target
 * export those TTX files using either "export selected" or "export all"

And here you are, you now have fully working bilingual TTX files you can open using TagEditor with the source/target language you chose!

Showing spaces and other special characters
MemoQ does not have a built-in switch to show or hide spaces and other non-printing characters. You can display them by using a specially adapted font. The font in question, Veronika, was developed by Endre Both, and with the author's kind permission it is also available from the Kilgray site at the links:

http://kilgray.com/memoq/VeronikaSans.ttf

http://kilgray.com/memoq/VeronikaSerif.ttf

Note: Both Veronika fonts display rectangles instead of extended CEE (Central & Eastern Europe) characters.

Denis Hay created similar fonts based on Calibri; these are also available from the Kilgray site with his kind permission:

http://kilgray.com/memoq/CALIBRI_MQ.ttf http://kilgray.com/memoq/CALIBRI_MQ2.ttf http://kilgray.com/memoq/CALIBRI_MQ3.ttf

A description of the fonts by Denis:

Calibri MQ just adds a smallish triangle-shaped glyph to display unbreakable spaces.

Calibri MQ2 also adds to that a tiny-weeny dot to display ordinary spaces. This dot does not hinder reading, unlike the usual modified fonts, but it allows easy spotting of double spaces when looking at it closely. That's the one I prefer.

Calibri MQ3 is quite similar to MQ2, but with a larger dot glyph for ordinary spaces, for those who may prefer that.

To show spaces while translating in MemoQ, follow these steps:


 * 1) Download the fonts from the links above
 * 2) Go to Control Panel / Fonts and choose Install New Font... from the File menu
 * 3) Browse to the folder where you saved the fonts, select them from the list at the top, and click OK
 * 4) In MemoQ, open Tools / Options and go to the Appearance, locations category. In the Font family drop-down list, select any of the newly installed fonts

MemoQ will now show small dots for every space character in the translation grid.

Entering non-breaking spaces
Although this is not a documented feature, MemoQ can enter non-breaking spaces useful e.g. in the case of French quotation marks. To enter a non-breaking space press ctrl+shift+space instead of space.

Getting rid of "rogue codes" in Word documents
For certain Word documents, MemoQ will show superfluous tags that apparently serve no purpose. Once you import your document, there's no way to delete these tags; the best you can do is to insert them by pressing F8 or put them at the end of the target segment by hitting Alt+F8.

There are several possible ways to reduce such tags prior to importing:


 * Select the whole document and set the right Language
 * Accept all changes
 * Turn off track changes
 * Turn off smart tags
 * Select the whole document and set character spacing - Scale 100%; Spacing: Normal; and Position: Normal
 * Save as Open Office and then back to Word (this may result in some loss of formatting)
 * Save doc as Word 6.0/95 (this may result in some loss of formatting)
 * TRADOS segment and clean up

These and other methods are discussed here: http://www.necco.ca/dv/word.htm#Rogue_codes

Some of these pre-import tips and others have been automated in a set of macros that I've assembled in a Word template with a custom toolbar (CodeZapper_2.3). This template also includes a few other pre- and post-processing macros that may be useful. It was principally intended for use with Deja Vu but MemoQ users may also find it useful in some circumstances. You can find it in the files section (http://tech.groups.yahoo.com/group/MemoQ/files/). Dave Turner

More ideas on removing rogue codes from Jim Wardell :

If Word files cause rogue codes in MemoQ, pre-edit them looking for the problems suggested above by Dave. Also:

Make sure autohypenation is deactivated in the entire Word file.

Use Find and Replace to remove all optional hyphens.

Make sure the Word setting "Hyphenate words in CAPS" is off.

Sometimes rogue codes are caused when the font size in the source PDF text hovers between two integer sizes. The OCR output (which even allows half-point sizes) then can contain embedded font size changes (e.g. 11 pt. --> 11.5 pt. --> 11 pt --> 10.5 pt.). If you get a lot of these, and the Word file itself contains several font sizes that you want to retain, you may need to go through and select the continuous font-size passages and apply the font size you want to use (in the above case, for example, perhaps Arial 11 pt.). A slicker, more professional way to do this would be to apply a style definition to such passages. Your style definition would also include No Autohypenation and normal character spacing.

If your source document does not contain bold or italics, select the entire file and change all to Bold + Italics. Then select the entire file again and remove the bold and italics.

If you are scanning PDF files using OCR software (and therefore are the one who created the rogue codes in the first place!), take a close look at the detailed settings options that were in effect when you exported from OCR to Word. Only use those settings that you need, the others may be generating rogue codes.

The Arial Unicode font is installed by OmniPage. OmniPage inserts tags around umlauts in Word files. I've solved this problem by removing the Arial Unicode font from my system. It's also a good idea when using OCR software to use font matching to restrict the fonts that are allowed in OCR output, e.g. to Times New Roman and Arial.

If your client offers to convert PDF files to Word for you, consider that he/she may be using a cheap PDF converter program to do this and might not have the slightest clue what he/she is doing. In this case, you're better off getting the PDF file yourself and using high-quality OCR software to do the conversion yourself. Be aware that PDF converters, even the best ones, are likely to cause more problems with rogue codes and formatting than professional quality OCR software. You get what you pay for. There also are major differences between the two leading professional-grade OCR programs in their ability to reduce rogue codes and produce TM-friendly formatting. Test both carefully and see which gives the more TM-friendly results in your situation.

The suggestions offered by Dave and myself should help you eliminate nearly all rogue codes, however if you are still getting too many, open MQ and notice where a given rogue code occurs, then open the offending file in Word at the same time. Try selecting the characters around the offending location and check for any changes in settings. If you learn something useful, please register as a Wikibooks author and add them to this page.

A suggestion that worked well for us (a gaming related company) was to delete specific kinds of these tags by simply using the regex ]*>, enabling regular expressions in find&replace, enabling source replacement, and enabling find&replace within tags within the checkbox. In 99% of docx documents with a flood of excessive tags, this solved the issue without any noticeable impact on formatting or quality. This also works in Excel files with similar issues. It'd still be best to do a test export afterwards to see if you broke anything, but usually this works without any problem whatsover. So yes, you CAN in fact delete them after the import with a bit of find&replace!

Disable case conversions in "Translation Results"
For some languages, you may want to disable the case conversions in the "Translation Results" pane.


 * "Tools" > "Options" > "TM defaults, user info"
 * Disable "Toggle all replacements"

Filter out unwanted languages
Having to scroll through the list of languages during project configuration is tedious. In a future build Kilgray are likely to make MemoQ remember a list of recently used languages and display those at the top of the list.

Meanwhile, users can eliminate unwanted languages using the following simple procedure (based on a suggest by Gregory in ).

If you don't have an XML editor you can download the free XML Marker software from here: 

Open XML Marker and open the file LangInfo.xml. This is likely to be located at 'C:\Documents and Settings\All Users\Application Data\MemoQ' or it may be somewhere else, depending on your installation options.

Note: Under Windows 7, the file may well be located at "C:\ProgramData\MemoQ". This is important to note, since a Windows Search will not commonly (?) find files in this special, hidden system folder. --Drawdenrubdarb (discuss • contribs) 08:14, 15 May 2012 (UTC)

In XML Marker highlight the language codes you don't require, right-click and select "Comment out Selection". Once all unwanted languages have been commented out, save the file and live happily ever after :-)

--HerbEppel 15:49, 17 November 2007 (UTC)

Reducing increased size of RTF files converted from DOC format containing images
MemoQ does not work with DOC files, instead, during import, it converts your files from DOC format to rich-text format (RTF) using your Microsoft® Office™ Word application. When the DOC files contain images, the images are converted to a useless, but huge windows metafile. This ensures compatibility with ANCIENT word processors, but does nothing for you. In fact, a simple company logo can expand the size of a short letter from 20 KB, to 1,200 KB (or 1.2 MB). And that is before you start adding text. The solution is a simple change in the registry for WORD on each machine. To keep Word from saving two copies of the graphic in your RTF file do the following:


 * 1) Close Word (if it’s running.)
 * 2) Click Start > Run. The Run dialog box appears.
 * 3) In the Open box, type regedit and click OK. The Registry Editor opens.
 * 4) Navigate to HKEY_CURRENT_USER > Software > Microsoft > Office > Version > Word > Options. (Replace Version with the version of Word you are using.)
 * 5) In the right pane of the window, right-click and choose New > String Value. A new string is created called New Value #1.
 * 6) Rename the value to ExportPictureWithMetafile. (To do this, you can choose Rename from the shortcut menu.)
 * 7) Once the name is changed, right-click on the string and choose Modify. The Edit String dialog box appears.
 * 8) In the Value data box, enter 0.
 * 9) Click OK.

This method is discussed here: 

Using MemoQ postcardware and MemoQ Translator Pro (full version) on the same computer
If you want to use MemoQ 2.0, but at the same time install the full or trial version of MemoQ on the same computer, please do the following:


 * 1) Install MemoQ 2.0.
 * 2) Copy everything under C:\Program Files\Kilgray\MemoQ into a different folder, and make a shortcut to MemoQ.exe.
 * 3) Install MemoQ Translator Pro.

Now you can use both programs at the same time - but make sure you use different resources.

Avoiding hangs when copying large blocks of text from source to target
If you want to copy large blocks of text from the source to the target during the translation process, MemoQ may currently hang or crash if the Quality Assurance module is running in the background.

Go to the Project QA Settings in the main settings area and make certain that none of the boxes above the tabs are checked. Wait until you really get to the point where you really want to start doing quality assurance checking before you actually start to run the QA features.

Using auto-translatables for number format conversion
Among other things, the auto-translatables function in MemoQ can be used to convert numbers from one language format to another. For example, English uses the comma as a thousands separator, and the full stop as a decimal separator. Italian uses them the opposite way. With the proper auto-translatable rules set, MemoQ will provide the "localized" version of numbers found in the source segment. These localized numbers are shown in the Translation results list. These auto-translated hits can be inserted quickly into the translation just like hits from translation memories or term bases. Auto-translatables are also used by the fragment assembly function.

Auto-translatables can be set at the project level (in the settings page of the project) or the global level for every project with the same source and target languages (in Tools menu > Options > Auto-translatables).

English to Danish/Dutch/Croatian/German/Romanian/Slovenian/Spanish
Below are the rules to enter for a project translated from English to the above (and possibly other) languages. It will localize numbers containing decimal separators or thousands separators (not both). The rules need to be entered exactly as below in exactly the same order to ensure that they work correctly. For information on entering auto-translatable rules, see the MemoQ help topics under Language specific settings > Auto-translations.

Rule 1 (changes 1.234 to 1,234)

Auto-translatable rule:

Replace order rule:

Explanation: If a sequence of digits is followed by a full stop and another sequence of digits, this rule will replace the full stop with a comma.

Rule 2 (changes 12,345,678 to 12.345.678)

Auto-translatable rule:

Replace order rule:

Explanation: If a sequence consisting of 1 to 3 digits is followed by a comma, which is followed by three digits, another comma and thrre digits again, the rule will replace the commas with full stops.

Rule 3 (changes 12,345 to 12.345)

Auto-translatable rule:

Replace order rule:

Explanation: If a sequence consisting of 2 to 3 digits is followed by a comma, which is followed by three digits, the rule will replace the comma with a full stop.