mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
fix locale problem with --disable-nls
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2952 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
fcb060f97d
commit
6a10fbcc39
@ -1,3 +1,8 @@
|
||||
2001-10-31 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* configure.in: check also for locale.h, so that things work out
|
||||
correctly with --disable-nls
|
||||
|
||||
2001-10-30 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* README:
|
||||
|
@ -262,7 +262,7 @@ AC_LANG_CPLUSPLUS
|
||||
# some standard header files
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_MAJOR
|
||||
AC_CHECK_HEADERS(sys/time.h sys/types.h sys/select.h strings.h)
|
||||
AC_CHECK_HEADERS(sys/time.h sys/types.h sys/select.h strings.h locale.h)
|
||||
|
||||
# some annoying header files
|
||||
#LYX_PATH_HEADER(stl_string_fwd.h)
|
||||
|
@ -1,3 +1,8 @@
|
||||
2001-10-31 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* gettext.C (locale_init): set LC_NUMERIC to "C" even if nls is
|
||||
disabled.
|
||||
|
||||
2001-10-30 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* lyx_main.C: change ref to known bugs
|
||||
|
@ -10,15 +10,16 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#endif
|
||||
|
||||
#include "LString.h"
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
|
||||
# if HAVE_GETTEXT
|
||||
# include <libintl.h> // use the header already in the system *EK*
|
||||
# ifdef HAVE_LOCALE_H
|
||||
# include <locale.h> // for LC_MESSAGES
|
||||
# endif
|
||||
# else
|
||||
# include "../intl/libintl.h"
|
||||
# endif
|
||||
@ -54,9 +55,9 @@ void locale_init()
|
||||
{
|
||||
# ifdef HAVE_LC_MESSAGES
|
||||
setlocale(LC_MESSAGES, "");
|
||||
# endif
|
||||
setlocale(LC_CTYPE, "");
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
# endif
|
||||
}
|
||||
|
||||
void gettext_init(string const & localedir)
|
||||
@ -74,5 +75,6 @@ void locale_init()
|
||||
|
||||
void gettext_init(string const &)
|
||||
{
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user