MODULE Localization;
TYPE
Language* = RECORD
code* : ARRAY 3 OF CHAR;
END;
Languages* = POINTER TO ARRAY OF Language;
VAR
currentLanguage : Language;
preferenceList : Languages;
PROCEDURE GetCurrentLanguage*() : Language;
BEGIN {EXCLUSIVE}
RETURN currentLanguage;
END GetCurrentLanguage;
PROCEDURE GetLanguagePreferences*() : Languages;
BEGIN {EXCLUSIVE}
RETURN preferenceList;
END GetLanguagePreferences;
PROCEDURE SetLanguage*(CONST language : Language);
BEGIN {EXCLUSIVE}
currentLanguage := language;
preferenceList[0] := currentLanguage;
END SetLanguage;
BEGIN
currentLanguage.code := "en";
NEW(preferenceList, 1);
preferenceList[0] := currentLanguage;
END Localization.
SystemTools.Free Localization ~