Jump to content

Global Lang Config


Recommended Posts

M2 Download Center

This is the hidden content, please
( 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 !!

  • Love 8
Link to comment
Share on other sites

  • Developer

You better throw your frustrations on somebody else, my post never had the purpose of offending, nor I think I'm doing it.

I never said it wasn't tested or working or if it was paid, whatever. Furthermore, never said I could do better as well.

I could have saved my comment but I felt like leaving a positive thing, even if I didn't finish reading the post, 'cause I didn't, as I said above.

If you took it as a personal attack, mate, I'm sorry, but you should get your shit straight.

  • Love 1

when you return 0 and server doesn't boot:

unknown.png

Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.