##stringtype C
##shortstrings
/****************************************************************
   This file was created automatically by `%fv'
   from "%f0".

   Do NOT edit by hand!
****************************************************************/

/* Include files */
#include <libraries/gadtools.h>
#include <proto/locale.h>

#include "%b_Cat.h"

/* Variables */
struct FC_String %b_Strings[] =
{
   { %s, %d },
   { NULL, 0 }
};

static struct Catalog *%bCatalog;


void Open%bCatalog()
{
   if (LocaleBase)
   {
      if (%bCatalog = OpenCatalog(NULL, "%b.catalog",
     			          OC_BuiltInLanguage, %l,
     			          OC_Version, %v,
     			          TAG_DONE
                                 )
         )
      {
         struct FC_String *fc;

         for (fc = %b_Strings; fc->Str; fc++)
         {
            fc->Str = GetCatalogStr(%bCatalog, fc->Id, fc->Str);
         }
      }
   }
}

void Close%bCatalog()
{
   if (%bCatalog)
   {
      CloseCatalog(%bCatalog);
   }
}

void LocalizeNewMenu(struct NewMenu *nm)
{
   while(nm->nm_Type != NM_END)
   {
      if (nm->nm_Label != NM_BARLABEL)
      {
         nm->nm_CommKey = ML_Support_Strings[(int)nm->nm_Label].Str;
         nm->nm_CommKey[1] = '\\0';
         nm->nm_Label = nm->nm_CommKey + 2;

         if (nm->nm_CommKey[0] == ' ')
         {
            nm->nm_CommKey = NULL;
         }
      }

      nm++;
   }
}

void LocalizeStringArray(STRPTR *Array)
{
   STRPTR *x;

   for (x = Array; *x; x++)
   {
      *x = %b_Strings[(int)*x].Str;
   }
}

