2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
9 #include <libraries/locale.h>
10 #include <proto/locale.h>
11 #include <proto/exec.h>
12 #include <proto/alib.h>
15 #include <aros/debug.h>
17 /*********************************************************************************************/
20 struct Library
*LocaleBase
;
22 struct LocaleBase
*LocaleBase
;
24 struct Catalog
*catalog
;
26 /*********************************************************************************************/
28 void InitLocale(STRPTR catname
, ULONG version
)
30 LocaleBase
= (struct LocaleBase
*)OpenLibrary("locale.library", 39);
33 catalog
= OpenCatalog(NULL
, catname
, OC_Version
, version
,
38 /*********************************************************************************************/
40 void CleanupLocale(void)
42 if (catalog
) CloseCatalog(catalog
);
43 if (LocaleBase
) CloseLibrary((struct Library
*)LocaleBase
);
46 /*********************************************************************************************/
48 CONST_STRPTR
MSG(ULONG id
)
52 return GetCatalogStr(catalog
, id
, CatCompArray
[id
].cca_Str
);
54 return CatCompArray
[id
].cca_Str
;
58 /*********************************************************************************************/