2 Copyright © 2009-2010, The AROS Development Team. All rights reserved.
6 #include <exec/types.h>
7 #include <proto/locale.h>
12 #define CATALOG_NAME "System/Prefs/Network.catalog"
13 #define CATALOG_VERSION 4
15 static const TEXT DEFYES
[] = "Yes", DEFNO
[] = "No";
17 /*** Variables **************************************************************/
18 struct Catalog
*catalog
;
19 struct Locale
*locale
;
22 /*** Functions **************************************************************/
23 /* Main *********************************************************************/
24 CONST_STRPTR
_(ULONG id
)
26 if (LocaleBase
!= NULL
&& catalog
!= NULL
)
27 return GetCatalogStr(catalog
, id
, CatCompArray
[id
].cca_Str
);
29 return CatCompArray
[id
].cca_Str
;
32 CONST_STRPTR
L_(ULONG id
)
34 if (LocaleBase
!= NULL
&& locale
!= NULL
)
35 return GetLocaleStr(locale
, id
);
37 return (id
== YESSTR
) ? DEFYES
: DEFNO
;
40 /* Setup ********************************************************************/
41 VOID
Locale_Initialize(VOID
)
43 if (LocaleBase
!= NULL
)
47 NULL
, CATALOG_NAME
, OC_Version
, CATALOG_VERSION
, TAG_DONE
49 locale
= OpenLocale(NULL
);
58 VOID
Locale_Deinitialize(VOID
)
60 if (LocaleBase
!= NULL
&& catalog
!= NULL
) CloseCatalog(catalog
);