mirror of
https://github.com/anope/anope.git
synced 2026-07-03 13:23:14 +02:00
Made gettext work on most OSs. Tested on Debian, FreeBSD, Gentoo, and Windows.
Added a search path option to the Config script for cmake to use when finding libraries for modules or for gettext. Fixed m_mysql and m_ssl to work under Windows, made the Windows Config program remember the last used options, and fixed Windows release builds.
This commit is contained in:
@@ -12,6 +12,36 @@
|
||||
#ifdef _WIN32
|
||||
#include "services.h"
|
||||
|
||||
struct WindowsLanguage
|
||||
{
|
||||
const char *languageName;
|
||||
USHORT windowsLanguageName;
|
||||
};
|
||||
|
||||
WindowsLanguage WindowsLanguages[] = {
|
||||
{"ca_ES", LANG_CATALAN},
|
||||
{"de_DE", LANG_GERMAN},
|
||||
{"el_GR", LANG_GREEK},
|
||||
{"es_ES", LANG_SPANISH},
|
||||
{"fr_FR", LANG_FRENCH},
|
||||
{"hu_HU", LANG_HUNGARIAN},
|
||||
{"it_IT", LANG_ITALIAN},
|
||||
{"nl_NL", LANG_DUTCH},
|
||||
{"pl_PL", LANG_POLISH},
|
||||
{"pt_PT", LANG_PORTUGUESE},
|
||||
{"ru_RU", LANG_RUSSIAN},
|
||||
{"tr_TR", LANG_TURKISH},
|
||||
{NULL, 0}
|
||||
};
|
||||
|
||||
USHORT WindowsGetLanguage(const char *lang)
|
||||
{
|
||||
for (int i = 0; WindowsLanguages[i].languageName; ++i)
|
||||
if (!strcmp(lang, WindowsLanguages[i].languageName))
|
||||
return WindowsLanguages[i].windowsLanguageName;
|
||||
return LANG_NEUTRAL;
|
||||
}
|
||||
|
||||
/** This is inet_pton, but it works on Windows
|
||||
* @param af The protocol type, AF_INET or AF_INET6
|
||||
* @param src The address
|
||||
|
||||
Reference in New Issue
Block a user