diff --git a/src/jrd/file_params.h b/src/jrd/file_params.h index 15c9096c47..18f6206efb 100644 --- a/src/jrd/file_params.h +++ b/src/jrd/file_params.h @@ -91,7 +91,7 @@ static const char* LOGFILE = "firebird.log"; #elif defined(WIN_NT) static const char* WORKFILE = "c:\\temp\\"; static const char* MSG_FILE = "firebird.msg"; -static const char MSG_FILE_LANG[]= "intl/%.8s.msg"; +static const char MSG_FILE_LANG[]= "intl\\%.8s.msg"; const int LOCALE_MAX = 6; static const char* LOGFILE = "firebird.log"; #elif defined(VMS) diff --git a/src/jrd/gds.cpp b/src/jrd/gds.cpp index 4b231d7004..acacf10511 100644 --- a/src/jrd/gds.cpp +++ b/src/jrd/gds.cpp @@ -1484,6 +1484,13 @@ SSHORT API_ROUTINE gds__msg_lookup(void* handle, if (fb_utils::readenv("LC_MESSAGES", p)) { sanitize(p); + Firebird::string::size_type pos = p.find_last_of('/'); + if (pos == Firebird::string::npos) + pos = p.find_last_of('\\'); + + if (pos != Firebird::string::npos) + p.erase(0, pos + 1); + fb_utils::snprintf(translated_msg_file, sizeof(translated_msg_file), MSG_FILE_LANG, p.c_str()); gds__prefix_msg(msg_file, translated_msg_file); @@ -1493,6 +1500,7 @@ SSHORT API_ROUTINE gds__msg_lookup(void* handle, } else status = 1; + if (status) { /* Default to standard message file */