home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / edu / DITOdev.lha / DITOdev / Extensions / Source / Español / Cat.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-23  |  2.7 KB  |  95 lines

  1. /****************************************************************
  2.    This file was created automatically by `KitCat V1.1'
  3.    Do NOT edit by hand!
  4. ****************************************************************/
  5.  
  6. #ifndef CAT_H
  7. #include "CAT.h"
  8. #endif  /*  !CAT_H           */
  9.  
  10. #ifndef CLIB_LOCALE_PROTOS_H
  11. #include <clib/locale_protos.h>
  12. #endif  /*  !CLIB_LOCALE_PROTOS_H   */
  13.  
  14. #ifdef AZTEC_C
  15. #ifndef __PRAGMAS_LOCALE_LIB_H
  16. #include <pragmas/locale_lib.h>
  17. #endif /*   !PRAGMAS_LOCALE_LIB_H   */
  18. #endif /*   AZTEC_C                 */
  19.  
  20. static LONG DITO_espanolVersion = 1;
  21. static const STRPTR DITO_espanolBuiltInLanguage = (STRPTR) "deutsch";
  22.  
  23. struct KCDITO_espanolArrayType
  24. {   LONG    cca_ID;
  25.     STRPTR  cca_Str;
  26. };
  27.  
  28. static const struct KCDITO_espanolArrayType KCDITO_espanolArray [] =
  29. {
  30.     {m_language, (STRPTR)m_language_STR},
  31.     {m_description, (STRPTR)m_description_STR},
  32.     {m_grammar, (STRPTR)m_grammar_STR},
  33.     {m_remark, (STRPTR)m_remark_STR},
  34.     {m_isplural, (STRPTR)m_isplural_STR},
  35.     {m_irrplural, (STRPTR)m_irrplural_STR},
  36.     {m_gen0, (STRPTR)m_gen0_STR},
  37.     {m_gen1, (STRPTR)m_gen1_STR},
  38.     {m_gen2, (STRPTR)m_gen2_STR},
  39.     {m_gen3, (STRPTR)m_gen3_STR},
  40.     {m_invar, (STRPTR)m_invar_STR},
  41.     {m_konjmax, (STRPTR)m_konjmax_STR},
  42.     {m_konjreg, (STRPTR)m_konjreg_STR},
  43.     {m_konjirr, (STRPTR)m_konjirr_STR},
  44.     {m_part0, (STRPTR)m_part0_STR},
  45.     {m_part1, (STRPTR)m_part1_STR},
  46.     {m_part2, (STRPTR)m_part2_STR},
  47.     {m_part3, (STRPTR)m_part3_STR},
  48.     {m_part4, (STRPTR)m_part4_STR},
  49.     {m_part5, (STRPTR)m_part5_STR},
  50. };
  51.  
  52.   extern struct Library *LocaleBase;
  53.  
  54. static struct Catalog *DITO_espanolCatalog = NULL;
  55. void OpenDITO_espanolCatalog(struct Locale *loc, STRPTR language)
  56. { LONG tag, tagarg;
  57.   CloseDITO_espanolCatalog();
  58.   if (language == NULL)
  59.   { tag = TAG_IGNORE;
  60.   }
  61.   else
  62.   { tag = OC_Language;
  63.     tagarg = (LONG) language;
  64.   }
  65.   if (LocaleBase != NULL  &&  DITO_espanolCatalog == NULL)
  66.   { DITO_espanolCatalog = OpenCatalog(loc, (STRPTR) "DITO_espanol.catalog",
  67.                              OC_BuiltInLanguage, DITO_espanolBuiltInLanguage,
  68.                              tag, tagarg,
  69.                              OC_Version, DITO_espanolVersion,
  70.                              TAG_DONE);
  71.   }
  72. }
  73.  
  74. void CloseDITO_espanolCatalog(void)
  75. { if (LocaleBase != NULL)
  76.     CloseCatalog(DITO_espanolCatalog);
  77.   DITO_espanolCatalog = NULL;
  78. }
  79.  
  80. STRPTR GetDITO_espanolString(LONG strnum)
  81. { STRPTR defaultstr = NULL;
  82.   LONG i;
  83.  
  84.   for (i = 0;  i < sizeof(KCDITO_espanolArray)/sizeof(struct KCDITO_espanolArrayType);  i++)
  85.     { if (KCDITO_espanolArray[i].cca_ID == strnum)
  86.       { defaultstr = KCDITO_espanolArray[i].cca_Str;
  87.         break;
  88.       }
  89.     }
  90.   if (DITO_espanolCatalog == NULL)
  91.   { return(defaultstr);
  92.   }
  93.   return(GetCatalogStr(DITO_espanolCatalog, strnum, defaultstr));
  94. }
  95.