Roxen.git/
server/
base_server/
roxen.pike
Branch:
Tag:
Non-build tags
All tags
No tags
2000-07-11
2000-07-11 14:29:05 by Andreas Lange <andreas@lange.cx>
371641a8fd72bc50cbbbe9c691ff99b4c0869aca (
22
lines) (+
13
/-
9
)
[
Show
|
Annotate
]
Branch:
5.2
set_locale() behaves as it should
Rev: server/base_server/roxen.pike:1.504
4:
// Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others. // ABS and suicide systems contributed freely by Francesco Chemolli
-
constant cvs_version="$Id: roxen.pike,v 1.
503
2000/07/11
01
:
52
:
52
nilsson
Exp $";
+
constant cvs_version="$Id: roxen.pike,v 1.
504
2000/07/11
14
:
29
:
05
lange
Exp $";
// Used when running threaded to find out which thread is the backend thread, // for debug purposes only.
368:
//! codes and the old symbolic names. { string set;
+
if(!lang)
+
lang = default_locale;
if( #if constant(Standards.ISO639_2) Standards.ISO639_2.get_language(lang)
376:
#endif ) set=lang;
-
else if(!lang)
-
set=default_locale;
+
else if( #if constant(Standards.ISO639_2) set=Standards.ISO639_2.map_639_1(lang)
388:
; else if(set=languages[lang]) ;
-
else
{
-
if(lang!=
lower
_
case(lang)) set_
locale
(lower_case(lang
)
);
-
//
Default
to
default
?
+
+
if(!set)
{
+
if(lang!=
default
_locale)
+
//
lang
not
ok, try
default
_locale
+
set_locale(default_locale);
return; }
-
+
mapping objects; #if constant(Locale.get_objects) objects=Locale.get_objects( set );