4 /****************************************************************
5 This file was created automatically by `%fv'
9 ****************************************************************/
13 #include <libraries/locale.h>
14 #include <proto/locale.h>
21 const struct FC_Type _%i = { %d, %s };
23 static struct Catalog *%b_Catalog = NULL;
25 static const struct TagItem %b_tags[] = {
26 { OC_BuiltInLanguage, (IPTR)%l },
31 void Open%bCatalog(struct Locale *loc, STRPTR language)
33 if(LocaleBase != NULL && %b_Catalog == NULL)
35 %b_Catalog = OpenCatalog(loc, (STRPTR) "%b.catalog",
36 language ? OC_Language : TAG_IGNORE, (ULONG)language,
41 struct Catalog *ExtOpenCatalog(struct Locale *loc, STRPTR language)
43 if(LocaleBase != NULL)
45 return OpenCatalog(loc, (STRPTR) "%b.catalog",
46 language ? OC_Language : TAG_IGNORE, (ULONG)language,
52 void Close%bCatalog(void)
54 if (LocaleBase != NULL)
56 CloseCatalog(%b_Catalog);
61 void ExtCloseCatalog(struct Catalog *catalog)
63 if (LocaleBase != NULL)
65 CloseCatalog(catalog);
69 STRPTR Get%bString(APTR fcstr)
71 STRPTR defaultstr = ((struct FC_Type *)fcstr)->Str;
73 return (STRPTR) GetCatalogStr(%b_Catalog, ((struct FC_Type *)fcstr)->ID, defaultstr);
77 STRPTR GetString(APTR fcstr, struct Catalog *catalog)
79 STRPTR defaultstr = ((struct FC_Type *)fcstr)->Str;
81 return (STRPTR) GetCatalogStr(catalog, ((struct FC_Type *)fcstr)->ID, defaultstr);