4 * Copyright © 2008 Christian Rosentreter <tokai@binaryriot.org>
5 * Copyright © 2012 Michal Zukowski, Michal Wozniak
11 #include <proto/locale.h>
13 /* must be included before locale.h
16 #define NEW_CATCOMP_ARRAY_IDS
17 #include "VPDF_strings.h"
21 extern struct Library
*LocaleBase
;
22 static APTR _locale_catalog
;
24 void locale_init(void)
28 _locale_catalog
= OpenCatalog(NULL
, "VPDF.catalog", OC_BuiltInLanguage
, (ULONG
) "english", TAG_DONE
);
32 void locale_cleanup(void)
36 CloseCatalog(_locale_catalog
); /* NULL is save here */
41 STRPTR
locale_getstr(ULONG array_id
)
43 const struct CatCompArrayType
*t
= CatCompArray
+array_id
;
45 return LocaleBase
? GetCatalogStr(_locale_catalog
, t
->cca_ID
, t
->cca_Str
) : t
->cca_Str
;