1 ##rem $Id: Modula2Mod.sd 253 2014-02-18 11:15:58Z damato $
4 IMPLEMENTATION MODULE %bLocale ;
6 (****************************************************
8 This file was created automatically by '%fv'
13 ****************************************************)
15 FROM SYSTEM IMPORT ADR, ADDRESS, TAG ;
16 FROM UtilityD IMPORT tagDone ;
18 IMPORT ll : OptLocaleL,
22 builtinlanguage = %l ;
26 catalog : ld.CatalogPtr ;
34 AppStringArray = ARRAY [0..%n-1] OF AppString ;
37 AppStrings = AppStringArray {
38 AppString{id : %i, str : ADR(%iStr)}%(,)
41 (*/// "CloseCatalog()" *)
43 PROCEDURE CloseCatalog() ;
47 ll.CloseCatalog(catalog) ;
54 (*/// "OpenCatalog(loc : ld.LocalePtr ; language : ARRAY OF CHAR) ;" *)
56 PROCEDURE OpenCatalog(loc : ld.LocalePtr ; language : ARRAY OF CHAR) ;
60 tags : ARRAY [0..7] OF LONGINT ;
64 IF (catalog = NIL) & (ll.localeBase # NIL) THEN
65 IF language[0] # "\o" THEN
66 tagPtr := TAG(tags, ld.ocBuiltInLanguage, ADR(builtinlanguage),
67 ld.ocLanguage, ADR(language),
68 ld.ocVersion, version,
71 tagPtr := TAG(tags, ld.ocBuiltInLanguage, ADR(builtinlanguage),
72 ld.ocVersion, version,
75 catalog := ll.OpenCatalogA(loc, ADR("%b.catalog"), tagPtr) ;
81 (*/// "GetString(num : LONGINT) : ld.StrPtr" *)
83 PROCEDURE GetString(num : LONGINT) : ld.StrPtr ;
92 WHILE (i < %n) AND (AppStrings[i].id # num) DO
97 default := AppStrings[i].str ;
102 IF catalog # NIL THEN
103 RETURN ll.GetCatalogStr(catalog, num, default) ;