M2 Download Center
Download Here ( Internal )
hi guys,
I did this for you today, I hope for some either useful or enlightening... Thank you for the attention and sorry for the bad English
search in locale_service.cpp
bool LocaleService_Init(const std::string& c_rstServiceName)
replace like this
bool LocaleService_Init(const std::string& c_rstServiceName)
{
#ifdef ENABLE_MULTY_LANG
//or it set local from db column
#else
if (!g_stServiceName.empty())
{
sys_err("ALREADY exist service");
return false;
}
g_stServiceName = c_rstServiceName;
//or it set local from db column
#endif
if ( "japan" == g_stServiceName)
{
__LocaleService_Init_JAPAN();
}
search for
using namespace std;
extern string g_stQuestDir;
extern set<string> g_setQuestObjectDir;
add replace
string g_stServiceName;
like this
#ifdef ENABLE_MULTY_LANG // Raziel |maked a new Token for Global Lang|
extern string g_stServiceName;
#else
string g_stServiceName;
#endif
then search in config.h
enum
{
ADDRESS_MAX_LEN = 15
};
add later
#ifdef ENABLE_MULTY_LANG // Raziel |maked a new Token for Global Lang|
extern std::string g_stServiceName;
#endif
so search in config.cpp
char g_szPublicIP[16] = "0";
char g_szInternalIP[16] = "0";
bool g_bSkillDisable = false;
int g_iFullUserCount = 2000;
int g_iBusyUserCount = 200;
//Canada
and add later
#ifdef ENABLE_MULTY_LANG
string g_stServiceName = "";
#endif
now in config.cpp search
TOKEN("channel")
{
str_to_number(g_bChannel, value_string);
continue;
}
and add later
#ifdef ENABLE_MULTY_LANG
TOKEN("LANG_GLOBAL") // Raziel |maked a new Token for Global Lang|
{
g_stServiceName = value_string;
fprintf(stdout, "g_stServiceName: %s\n", g_stServiceName.c_str());
continue;
}
#endif
and the last change in service.h add this
#define ENABLE_MULTY_LANG // Raziel |maked a new Token for Global Lang| sintax |LANG_GLOBAL: germany| config from core
Now you can use different Language for a each channel and you choose all from config !
1 server 1 database but not only one locale for each channel
Bye ! enjoy . RazieL
You can put like ! is FREE !!