home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / 3_1EXAM1.DMS / in.adf / locale / locale.lha / Localize / GetString.af < prev    next >
Encoding:
Text File  |  1993-11-04  |  551 b   |  25 lines

  1.  
  2. static STRPTR NotFoundString = "localized string not found";
  3.                                    
  4. static STRPTR GetString ( struct Catalog * catalog, ULONG id)
  5. {
  6.     STRPTR local = NotFoundString;
  7.     UWORD  i, last;
  8.  
  9.     last = sizeof(AppStrings) / sizeof(AppStrings[0]);
  10.  
  11.     for (i = 0; i < last; i++)
  12.     {
  13.         if(AppStrings[i].as_ID == id)
  14.         {
  15.             local = AppStrings[i].as_Str;
  16.             break;
  17.         }
  18.     }
  19.  
  20.     if (LocaleBase && catalog && *local)
  21.         local = GetCatalogStr(catalog, id, local);
  22.  
  23.     return(local);
  24. }
  25.