| GTranslator Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
GtranslatorTranslationMemory;
struct GtranslatorTranslationMemoryIface;
struct GtranslatorTranslationMemoryMatch;
gboolean gtranslator_translation_memory_store
(GtranslatorTranslationMemory *obj,
const gchar *original,
const gchar *translation);
GList * gtranslator_translation_memory_lookup
(GtranslatorTranslationMemory *obj,
const gchar *phrase);
void gtranslator_translation_memory_set_max_omits
(GtranslatorTranslationMemory *obj,
gsize omits);
void gtranslator_translation_memory_set_max_delta
(GtranslatorTranslationMemory *obj,
gsize delta);
void gtranslator_translation_memory_set_max_items
(GtranslatorTranslationMemory *obj,
gint items);
typedef struct _GtranslatorTranslationMemory GtranslatorTranslationMemory;
struct GtranslatorTranslationMemoryIface {
GTypeInterface g_iface;
gboolean (*store) (GtranslatorTranslationMemory * obj,
const gchar * original, const gchar * translation);
GList *(*lookup) (GtranslatorTranslationMemory * obj, const gchar * phrase);
void (*set_max_omits) (GtranslatorTranslationMemory * obj, gsize omits);
void (*set_max_delta) (GtranslatorTranslationMemory * obj, gsize delta);
void (*set_max_items) (GtranslatorTranslationMemory * obj, gint items);
};
struct GtranslatorTranslationMemoryMatch {
gchar *match;
gint level;
};
gboolean gtranslator_translation_memory_store (GtranslatorTranslationMemory *obj, const gchar *original, const gchar *translation);
Stores the original and translation strings in the database.
|
a GtranslatorTranslationMemory |
|
the untranslated text |
|
the original text translated
|
Returns : |
GList * gtranslator_translation_memory_lookup (GtranslatorTranslationMemory *obj, const gchar *phrase);
Looks for the phrase in the database and gets a list of the GtranslatorTranslationMemoryMatch.
|
a GtranslatorTranslationMemory |
|
the unstranslated text to search for translations. |
Returns : |
a list of GtranslatorTranslationMemoryMatch. |
void gtranslator_translation_memory_set_max_omits
(GtranslatorTranslationMemory *obj,
gsize omits);
Sets the number of omits used in the search.
|
|
|
the number of omits |
void gtranslator_translation_memory_set_max_delta
(GtranslatorTranslationMemory *obj,
gsize delta);
Sets the difference in the length of string for searching in the database.
|
|
|
the difference in the length of strings |
void gtranslator_translation_memory_set_max_items
(GtranslatorTranslationMemory *obj,
gint items);
Sets the number of item to return in gtranslator_translation_memory_lookup().
|
|
|
the max item to return in lookup |