2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
6 /*******************************************************************************************/
9 #include <libraries/gadtools.h>
10 #include <proto/exec.h>
11 #include <proto/dos.h>
12 #include <proto/locale.h>
14 #include "asl_intern.h"
19 /*******************************************************************************************/
21 STRPTR
GetString(LONG id
, struct Catalog
*catalog
, struct AslBase_intern
*AslBase
)
23 STRPTR retval
= CatCompArray
[id
].cca_Str
;
25 if (catalog
&& LocaleBase
)
27 retval
= (STRPTR
)GetCatalogStr(catalog
, id
, retval
);
33 /*******************************************************************************************/
35 void LocalizeMenus(struct NewMenu
*nm
, struct Catalog
*catalog
, struct AslBase_intern
*AslBase
)
37 struct NewMenu
*actnm
= nm
;
39 for(actnm
= nm
; actnm
->nm_Type
!= NM_END
; actnm
++)
41 if (actnm
->nm_Label
!= NM_BARLABEL
)
43 IPTR id
= (IPTR
)actnm
->nm_Label
;
44 STRPTR str
= GetString(id
, catalog
, AslBase
);
46 switch(actnm
->nm_Type
)
49 actnm
->nm_Label
= str
;
54 actnm
->nm_Label
= str
+ 2;
55 if (str
[0] != ' ') actnm
->nm_CommKey
= str
;
59 } /* if (actnm->nm_Label != NM_BARLABEL) */
61 } /* for(actnm = nm; nm->nm_Type != NM_END; nm++) */
65 /*******************************************************************************************/