2002-09-13 14:56:23 +00:00
|
|
|
#ifndef __DICTION_H
|
|
|
|
#define __DICTION_H
|
|
|
|
|
2003-12-03 09:41:16 +00:00
|
|
|
#ifndef __STRINGS_H
|
|
|
|
#include <strings.h>
|
|
|
|
#endif
|
|
|
|
|
2004-03-12 14:39:04 +00:00
|
|
|
#ifdef WIN32
|
2002-09-13 14:56:23 +00:00
|
|
|
#define TO_BE_TRANSLATED "\03\02\01\00"
|
|
|
|
#define ALREADY_TRANSLATED "\01\02\03\00"
|
2004-03-12 14:39:04 +00:00
|
|
|
#endif
|
2002-09-13 14:56:23 +00:00
|
|
|
|
|
|
|
#ifndef XVT_INCL_XVT
|
2004-07-21 10:52:09 +00:00
|
|
|
#include <xvt.h>
|
2002-09-13 14:56:23 +00:00
|
|
|
#endif
|
|
|
|
|
2003-12-03 09:41:16 +00:00
|
|
|
TString& txt2xml(const TString& str);
|
|
|
|
TString& xml2txt(const TString& str);
|
|
|
|
|
2002-09-13 14:56:23 +00:00
|
|
|
const char* dictionary_translate(const char* sentence);
|
|
|
|
const char* dictionary_translate_macro(const char* sentence);
|
|
|
|
const char* dictionary_translate_prompt(const char* prompt, int maxlen = 0);
|
|
|
|
const char* dictionary_translate_macro_prompt(const char* prompt, int maxlen = 0);
|
|
|
|
const char* dictionary_translate_header(const char* head);
|
|
|
|
const char* dictionary_translate_macro_header(const char* head);
|
|
|
|
const char* dictionary_translate_menu_item(const char* menu);
|
|
|
|
|
|
|
|
void dictionary_translate_menu(WINDOW win);
|
2004-07-21 10:52:09 +00:00
|
|
|
void dictionary_translate_menu(MENU_ITEM* menu);
|
2002-09-13 14:56:23 +00:00
|
|
|
bool dictionary_active();
|
|
|
|
void dictionary_close();
|
|
|
|
|
2004-03-12 14:39:04 +00:00
|
|
|
|
|
|
|
#ifdef WIN32
|
2002-09-13 14:56:23 +00:00
|
|
|
#define TR(str) dictionary_translate_macro(TO_BE_TRANSLATED##str)
|
|
|
|
#define PR(str) dictionary_translate_macro_prompt(TO_BE_TRANSLATED##str)
|
2002-10-24 10:47:49 +00:00
|
|
|
#define BR(str, len) dictionary_translate_macro_prompt(TO_BE_TRANSLATED##str, len)
|
2002-09-13 14:56:23 +00:00
|
|
|
#define HR(str) dictionary_translate_macro_header(TO_BE_TRANSLATED##str)
|
2002-10-24 10:47:49 +00:00
|
|
|
#define FR(str) dictionary_translate_macro(TO_BE_TRANSLATED##str)
|
2004-03-12 14:39:04 +00:00
|
|
|
#else
|
|
|
|
#define TR(str) dictionary_translate_macro(str)
|
|
|
|
#define PR(str) dictionary_translate_macro_prompt(str)
|
|
|
|
#define BR(str, len) dictionary_translate_macro_prompt(str, len)
|
|
|
|
#define HR(str) dictionary_translate_macro_header(str)
|
|
|
|
#define FR(str) dictionary_translate_macro(str)
|
|
|
|
#endif
|
2002-09-13 14:56:23 +00:00
|
|
|
|
2004-03-12 14:39:04 +00:00
|
|
|
#endif
|