|
| iMatix home page | << | < | > | >> |
SFLVersion 2.11 |
#include "sfllang.h" int set_userlang (int language)
Sets language used for date and numeric translation. The valid user languages are:
| USERLANG DEFAULT | Default language (use hard-coded values) |
| USERLANG DA | Danish |
| USERLANG DE | German |
| USERLANG EN | English |
| USERLANG ES | Castillian Spanish |
| USERLANG FB | Belgian or Swiss French |
| USERLANG FR | French |
| USERLANG IS | Icelandic |
| USERLANG IT | Italian |
| USERLANG NL | Dutch |
| USERLANG NO | Norwegian |
| USERLANG PO | Portuguese |
| USERLANG SV | Swedish |
{
/* Order of this table is not critical */
static struct {
int language;
char **units;
char **tens;
char **days;
char **months;
} languages [] =
{
{ USERLANG_DEFAULT, EN_units, EN_tens, EN_days, EN_months },
{ USERLANG_DA, DA_units, DA_tens, EN_days, DA_months },
{ USERLANG_DE, DE_units, DE_tens, EN_days, DE_months },
{ USERLANG_EN, EN_units, EN_tens, EN_days, EN_months },
{ USERLANG_ES, ES_units, ES_tens, EN_days, ES_months },
{ USERLANG_FB, FR_units, FB_tens, FR_days, FR_months },
{ USERLANG_FR, FR_units, FR_tens, FR_days, FR_months },
{ USERLANG_IS, IS_units, IS_tens, EN_days, IS_months },
{ USERLANG_IT, IT_units, IT_tens, EN_days, IT_months },
{ USERLANG_NL, NL_units, NL_tens, NL_days, NL_months },
{ USERLANG_NO, NO_units, NO_tens, EN_days, NO_months },
{ USERLANG_PO, PO_units, PO_tens, EN_days, PO_months },
{ USERLANG_SV, SV_units, SV_tens, EN_days, SV_months },
{ -1, NULL, NULL, NULL, NULL }
};
int
index;
for (index = 0; languages [index].language != -1; index++)
if (languages [index].language == language)
{
user_language = language;
units_table = languages [index].units;
tens_table = languages [index].tens;
day_table = languages [index].days;
month_table = languages [index].months;
return (0);
}
return (-1);
}
| | << | < | > | >> |
|