FreeBASIC  0.91.0
drv_intl_get.c
Go to the documentation of this file.
1 /* get i18n data */
2 
3 #include "../fb.h"
4 #include "fb_private_intl.h"
5 
6 const char *fb_DrvIntlGet( eFbIntlIndex Index )
7 {
8  static char buf[128];
9  LCTYPE lctype;
10 
11  switch( Index ) {
12  case eFIL_DateDivider: lctype = LOCALE_SDATE; break;
13  case eFIL_TimeDivider: lctype = LOCALE_STIME; break;
14  case eFIL_NumDecimalPoint: lctype = LOCALE_SDECIMAL; break;
15  case eFIL_NumThousandsSeparator: lctype = LOCALE_STHOUSAND; break;
16  default:
17  return NULL;
18  }
19 
20  return fb_hGetLocaleInfo( LOCALE_USER_DEFAULT, lctype,
21  buf, sizeof(buf) - 1 ) ? buf : NULL;
22 }