During import you can specify a number of settings, e.g.what should happen with potentially existing TM field values - whether they should be left unchanged, overwritten, or merged.because the translation that was previously entered is incorrect or outdated.In the following step you will learn how to programmatically handle cases in which the target segment of an existing TU should be replaced by a new translation. In our simplified implementation, we first open the TM. Like in the previous chapter (see Doing Translation Memory Lookups) we 'outsource' the search settings to a separate function, i.e.: The search should yield one result (i.e.This file includes only the original texts, which need translation. The translator’s tool will be able to merge the texts from the file with the existing translations (the file).It will mark new or modified texts as needing translation and will leave existing translation intact. It allows merging between new texts in a POT file (compared to the current translation in the PO file) and produces both PO and MO as output.Since PO / POT files are so popular, there are several excellent tools for translating them. There are some great open-source web-based tools for translating Get Text files.
Adding a single TU is basically like a mini-import.
For the next step we suppose that you would like to add a simple TU with plain text segments.
Moreover, we assume that you need to add a picklist field value, i.e.
Each TU contains at least a source and a target segment.
You therefore need to create a source and target segment object based on the TM language direction. In this example, we specify two strings, which works well if you only need to add plain text.