Restructured the images for ImageButton:
[AROS.git] / workbench / prefs / time / locale.c
blob3ea47fc1db4c09e3d1f2b668ea281c7eba362642
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #define CATCOMP_ARRAY
7 #include "strings.h"
9 #include "global.h"
11 /*********************************************************************************************/
13 void InitLocale(STRPTR catname, ULONG version)
15 #ifdef __AROS__
16 LocaleBase = (struct LocaleBase *)OpenLibrary((STRPTR)"locale.library", 39);
17 #else
18 LocaleBase = (struct Library *)OpenLibrary("locale.library", 39);
19 #endif
20 if (LocaleBase)
22 catalog = OpenCatalog(NULL, catname, OC_Version, version,
23 TAG_DONE);
27 /*********************************************************************************************/
29 void CleanupLocale(void)
31 if (catalog) CloseCatalog(catalog);
32 if (LocaleBase) CloseLibrary((struct Library *)LocaleBase);
35 /*********************************************************************************************/
37 STRPTR MSG(ULONG id)
39 STRPTR retval;
41 if (catalog)
43 retval = (STRPTR)GetCatalogStr(catalog, id, CatCompArray[id].cca_Str);
45 else
47 retval = CatCompArray[id].cca_Str;
50 return retval;
53 /*********************************************************************************************/