2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
10 #include <aros/libcall.h>
11 #include <exec/types.h>
12 #include <libraries/lowlevel.h>
13 #include <libraries/locale.h>
14 #include <proto/locale.h>
16 #include "lowlevel_intern.h"
24 { "english.language" , LANG_ENGLISH
},
25 { "deutsch.language" , LANG_GERMAN
},
26 { "français.language" , LANG_FRENCH
},
27 { "español.language" , LANG_SPANISH
},
28 { "italiano.language" , LANG_ITALIAN
},
29 { "português.language" , LANG_PORTUGUESE
},
30 { "dansk.language" , LANG_DANISH
},
31 { "nederlands.language" , LANG_DUTCH
},
32 { "norsk.language" , LANG_NORWEGIAN
},
33 { "suomi.language" , LANG_FINNISH
},
34 { "svenska.language" , LANG_SWEDISH
},
35 { "greek.language" , LANG_GREEK
}
38 /*****************************************************************************
42 AROS_LH0(ULONG
, GetLanguageSelection
,
47 struct LowLevelBase
*, LowLevelBase
, 6, LowLevel
)
59 *****************************************************************************/
67 * Get the default locale
69 struct Locale
* locale
;
71 LocaleBase
= OpenLibrary("locale.library", 0);
72 if (LocaleBase
== NULL
)
75 locale
= OpenLocale("");
78 CloseLibrary(LocaleBase
);
82 while (NULL
!= langlist
[index
].langstring
)
84 if (0 == strcmp(locale
->loc_LanguageName
, langlist
[index
].langstring
))
87 CloseLibrary(LocaleBase
);
88 return langlist
[index
].lang
;
94 CloseLibrary(LocaleBase
);
98 } /* GetLanguageSelection */