2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
7 #include <proto/exec.h>
8 #include <proto/locale.h>
9 #include <proto/alib.h>
10 #include <libraries/locale.h>
15 /*********************************************************************************************/
17 struct Catalog
*catalog
;
18 struct Locale
*locale
;
20 void InitLocale(STRPTR catname
, ULONG version
)
23 LocaleBase
= (struct LocaleBase
*)OpenLibrary("locale.library", 39);
25 LocaleBase
= (struct Library
*)OpenLibrary("locale.library", 39);
29 catalog
= OpenCatalog(NULL
, catname
, OC_Version
, version
, TAG_DONE
);
30 locale
= OpenLocale(NULL
);
34 /*********************************************************************************************/
36 void CleanupLocale(void)
38 if (locale
) CloseLocale(locale
);
39 if (catalog
) CloseCatalog(catalog
);
40 if (LocaleBase
) CloseLibrary((struct Library
*)LocaleBase
);
43 /*********************************************************************************************/
45 CONST_STRPTR
MSG(ULONG id
)
51 retval
= GetCatalogStr(catalog
, id
, CatCompArray
[id
].cca_Str
);
53 retval
= CatCompArray
[id
].cca_Str
;
59 CONST_STRPTR
MSG_STD(ULONG id
) {
64 retval
= GetLocaleStr(locale
, id
);
73 /*********************************************************************************************/