static char *_extra_help_de = "a, u, o for AE, UE, OE";
+#define NB_TRANSLATIONS_DE 3
+
+static trans_t _trans_table_de[NB_TRANSLATIONS_DE] = { { 'a', "Ä" }, { 'u', "Ü" }, { 'o', "Ö" } };
+
#endif /* __BAG_DE__ */
/* vim: set ts=4 sw=4 et: */
static char *_extra_help_es = "c, l, n, r for CH, LL, NN, RR";
+#define NB_TRANSLATIONS_ES 4
+
+static trans_t _trans_table_es[NB_TRANSLATIONS_ES] = { { 'c', "CH" }, { 'l', "LL" }, { 'n', "Ñ" }, { 'r', "RR" } };
+
#endif /* __BAG_ES__ */
/* vim: set ts=4 sw=4 et: */
static char *_extra_help_nl = "i for IJ";
+#define NB_TRANSLATIONS_NL 1
+
+static trans_t _trans_table_nl[NB_TRANSLATIONS_NL] = { { 'i', "IJ" } };
+
#endif /* __BAG_NL__ */
/* vim: set ts=4 sw=4 et: */
static bag_t _bag = {0};
+static translation_t _translation = {0};
+
bag_t *getbag (char *lang)
{
bag_t *pt = NULL;
return pt;
}
+translation_t *gettranslationtable (char *lang)
+{
+ translation_t *pt = NULL;
+
+ if (strcmp (lang, "de") == 0) {
+ pt = &_translation;
+ pt->nb = NB_TRANSLATIONS_DE;
+ pt->tab = _trans_table_de;
+ } else if (strcmp (lang, "es") == 0) {
+ pt = &_translation;
+ pt->nb = NB_TRANSLATIONS_ES;
+ pt->tab = _trans_table_es;
+ } else if (strcmp (lang, "nl") == 0) {
+ pt = &_translation;
+ pt->nb = NB_TRANSLATIONS_NL;
+ pt->tab = _trans_table_nl;
+ }
+ return pt;
+}
+
/* vim: set ts=4 sw=4 et: */
char *getextrahelp (char *lang);
+translation_t *gettranslationtable (char *lang);
+
#endif /* __CONSTANT_H__ */
/* vim: set ts=4 sw=4 et: */
spelling_e *status;
} word_t;
+typedef struct {
+ char tile;
+ char *val;
+} trans_t;
+
+typedef struct {
+ int nb;
+ trans_t *tab;
+} translation_t;
+
#endif /* __TYPE_H__ */
/* vim: set ts=4 sw=4 et: */