Hint added.
[AROS.git] / workbench / prefs / boot / locale.c
blob5a5dd6c08a3f1c7bf0f0ed9af484b9ae0c4ef02e
1 /*
2 Copyright © 2009-2013, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <exec/types.h>
7 #include <proto/locale.h>
9 #define CATCOMP_ARRAY
10 #include "strings.h"
12 #define CATALOG_NAME "System/Prefs/Boot.catalog"
13 #define CATALOG_VERSION 1
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);
28 else
29 return CatCompArray[id].cca_Str;
32 CONST_STRPTR L_(ULONG id)
34 if (LocaleBase != NULL && locale != NULL)
35 return GetLocaleStr(locale, id);
36 else
37 return (id == YESSTR) ? DEFYES : DEFNO;
40 /* Setup ********************************************************************/
41 VOID Locale_Initialize(VOID)
43 if (LocaleBase != NULL)
45 catalog = OpenCatalog
47 NULL, CATALOG_NAME, OC_Version, CATALOG_VERSION, TAG_DONE
49 locale = OpenLocale(NULL);
51 else
53 catalog = NULL;
54 locale = NULL;
58 VOID Locale_Deinitialize(VOID)
60 if (LocaleBase != NULL && catalog != NULL) CloseCatalog(catalog);