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 /*********************************************************************************************/
19 struct LocaleBase
*LocaleBase
;
20 struct Catalog
*catalog
;
22 /*********************************************************************************************/
24 void InitLocale(STRPTR catname
, ULONG version
)
26 LocaleBase
= (struct LocaleBase
*)OpenLibrary("locale.library", 39);
29 catalog
= OpenCatalog(NULL
, catname
, OC_Version
, version
,
34 /*********************************************************************************************/
36 void CleanupLocale(void)
38 if (catalog
) CloseCatalog(catalog
);
39 if (LocaleBase
) CloseLibrary((struct Library
*)LocaleBase
);
42 /*********************************************************************************************/
44 CONST_STRPTR
MSG(ULONG id
)
48 return GetCatalogStr(catalog
, id
, CatCompArray
[id
].cca_Str
);
50 return CatCompArray
[id
].cca_Str
;
54 /*********************************************************************************************/