Local names for dates and months

Procedure GetLocaleInfoA can be used to retrieve all the information entered in "Control Panel / Regional Settings", both for the current locale and for all other locales. This can be useful for lots of things like displaying the actual names for days and months.
The demo window, shown in the picture, allows to choose a locale and fills a couple of selection lists showing the month names, abbreviated month names, day names and abbreviated day names. It uses the following definitions:

/* Procedure GetLocaleInfoA is declared in windows.p.
   Use includefile {i18n.i} to use declared constants.
   i18n.i is part of everything.zip */
 
PROCEDURE GetLocaleInfoA EXTERNAL "kernel32" :
   DEFINE INPUT PARAMETER        Locale      AS LONG.
   DEFINE INPUT PARAMETER        dwFlags     AS LONG.
   DEFINE INPUT-OUTPUT PARAMETER lpLCData    AS CHARACTER.
   DEFINE INPUT PARAMETER        cchData     AS LONG.
   DEFINE RETURN PARAMETER       cchReturned AS LONG.
END PROCEDURE.

The radio set in the window is defined as:

{i18n.i}
 
DEFINE VARIABLE RD-LANGID AS INTEGER 
     VIEW-AS RADIO-SET VERTICAL
     RADIO-BUTTONS 
          "LOCALE_USER_DEFAULT", {&LOCALE_USER_DEFAULT},
          "LOCALE_SYSTEM_DEFAULT", {&LOCALE_SYSTEM_DEFAULT},
          "Dutch", {&LANGID_DUTCH},
          "French", {&LANGID_FRENCH},
          "German", {&LANGID_GERMAN}, 
          "Spanish", {&LANGID_SPANISH},
          "English", {&LANGID_ENGLISH},
          "Italian", {&LANGID_ITALIAN}
     SIZE 34 BY 5.24 NO-UNDO.
 
--------------------------------------------------------------------------------
ON VALUE-CHANGED OF RD-LANGID IN FRAME DEFAULT-FRAME
DO:
  ASSIGN rd-langid.
 
  DEFINE VARIABLE chName AS CHARACTER    NO-UNDO.
  DEFINE VARIABLE i      AS INTEGER NO-UNDO.
  DEFINE VARIABLE cchRet AS INTEGER NO-UNDO.
 
  SELECT-day:LIST-ITEMS="".
  DO i=0 TO 6 :  
    chName = FILL("x",50).
    RUN GetLocaleInfoA IN hpApi ( RD-LANGID ,
                                  {&LOCALE_SDAYNAME1} + i,
                                  INPUT-OUTPUT chName,
                                  LENGTH(chName),
                                  OUTPUT cchRet
                                ).  
    SELECT-day:ADD-LAST(chName).
  END.
 
  SELECT-abbrevday:LIST-ITEMS="".
  DO i=0 TO 6 :  
    chName = FILL("x",50).
    RUN GetLocaleInfoA IN hpApi( RD-LANGID ,
                                 {&LOCALE_SABBREVDAYNAME1} + i,
                                 INPUT-OUTPUT chName,
                                 LENGTH(chName),
                                 OUTPUT cchRet
                               ).  
    SELECT-abbrevday:ADD-LAST(chName).
  END.
 
  SELECT-month:LIST-ITEMS="".
  DO i=0 TO 11 :  
    chName = FILL("x",50).
    RUN GetLocaleInfoA IN hpApi ( RD-LANGID ,
                                  {&LOCALE_SMONTHNAME1} + i,
                                  INPUT-OUTPUT chName,
                                  LENGTH(chName),
                                  OUTPUT cchRet
                                ).  
    SELECT-month:ADD-LAST(chName).
  END.
 
  SELECT-abbrevmonth:LIST-ITEMS="".
  DO i=0 TO 11 :  
    chName = FILL("x",50).
    RUN GetLocaleInfoA IN hpApi ( RD-LANGID ,
                                  {&LOCALE_SABBREVMONTHNAME1} + i,
                                  INPUT-OUTPUT chName,
                                  LENGTH(chName),
                                  OUTPUT cchRet
                                ).  
    SELECT-abbrevmonth:ADD-LAST(chName).
  END.
END.