Guida [Mini Release]multi lingua per channels differenti stesso server stesso db

°DarknesS°

Utente Electrum
31 Luglio 2013
107
17
57
105
Ultima modifica:
Ciao Ragazzi
Oggi non sapevo che fare… ho fatto questo per voi..
un semplice sistema per caricare un locale differente su differenti channel dello stesso server con stesso database,
quindi se in channel2 metterete all interno del config
LANG_GLOBAL: germany dovrete avere all interno tutto quello che riguarda il locale germany cosi' potrete fare ad esempio
4 canali uno italiano uno spagnolo uno tedesco uno inglese e avere un server multi lingua completo di quest

in locale_service.cpp

bool LocaleService_Init(const std::string& c_rstServiceName)

cambiate con

C++:
bool LocaleService_Init(const std::string& c_rstServiceName)
{
#ifdef ENABLE_MULTY_LANG // Raziel |maked a new Token for Global Lang|
    sys_err("NEW LANGUAGE GLOBAL ARE MAKED |WELL DONE!!|");
#else
    if (!g_stServiceName.empty())
    {
        sys_err("ALREADY exist service");
        return false;
    }

    g_stServiceName = c_rstServiceName;
#endif
    if ( "japan" == g_stServiceName)
    {
        __LocaleService_Init_JAPAN();
    }

cercate


string g_stServiceName;


cosi'

C++:
#ifdef ENABLE_MULTY_LANG // Raziel |maked a new Token for Global Lang|
extern string    g_stServiceName;
#else
string g_stServiceName;
#endif



cercate in config.h



enum { ADDRESS_MAX_LEN = 15 };



e aggiungete dopo

C++:
#ifdef ENABLE_MULTY_LANG // Raziel |maked a new Token for Global Lang|
extern std::string    g_stServiceName;
#endif



cercate 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


aggiungete dopo

C++:
#ifdef ENABLE_MULTY_LANG
string    g_stServiceName = "";
#endif



ora in config.cpp cercate

TOKEN("channel") { str_to_number(g_bChannel, value_string); continue; }


aggiungete dopo
C++:
#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



adesso in service.h add this

C++:
#define ENABLE_MULTY_LANG // Raziel |maked a new Token for Global Lang| sintax |LANG_GLOBAL: germany| config from core

1 server 1 database e tutti i locali che volete settandoli nei config di ogni ch

Bye ! enjoy . DarknesS
 
CHE ritorno in gran stile :)
Purtroppo non credo sia un ritorno,basta guardare quanta gente ha messo mi piace o ha ringraziato …piuttosto che rilasciare qua rilascio ai turki almeno loro ringraziano…. come puoi vedere sei l unico ad aver risposto e non hai nemmeno messo una reazione! come per dire molto utile rilasciare lavori eh XD
Pensa che stavo per rilasciae quest category sistema pendenti ecc ec , questo era un test che ha dato come esito quello che immaginavo…
Messaggio unito automaticamente:

CHE ritorno in gran stile :)
ps .. dammi un tuo contatto che forse potresti essermi d aiuto xD e ti potrebbe piacere
 
  • Mi piace
Reazioni: JustARegularGuy
Purtroppo non credo sia un ritorno,basta guardare quanta gente ha messo mi piace o ha ringraziato …piuttosto che rilasciare qua rilascio ai turki almeno loro ringraziano…. come puoi vedere sei l unico ad aver risposto e non hai nemmeno messo una reazione! come per dire molto utile rilasciare lavori eh XD
Pensa che stavo per rilasciae quest category sistema pendenti ecc ec , questo era un test che ha dato come esito quello che immaginavo…
Messaggio unito automaticamente:


ps .. dammi un tuo contatto che forse potresti essermi d aiuto xD e ti potrebbe piacere
E' cambiato un pò tutto qui su inforge, devi pubblicare all'estero non perchè qui in italia non riconoscono il tuo lavoro, ma semplicemente perchè qui c'è pochissima gente interessata a metin. Precisamente due categorie, chi non sa completamente cosa hai pubblicato, e ti assicuro che sono la stragrande maggioranza, ed infine una piccola minoranza sa cos'è ma non gli interessa.

In italia sono rimasti nabbi e developer, non esiste più l'utente medio che cerca di informarsi e studiare basandosi su una relaese.

Pubblica all'estero.
 
Ciao Ragazzi
Oggi non sapevo che fare… ho fatto questo per voi..
un semplice sistema per caricare un locale differente su differenti channel dello stesso server con stesso database,
quindi se in channel2 metterete all interno del config
LANG_GLOBAL: germany dovrete avere all interno tutto quello che riguarda il locale germany cosi' potrete fare ad esempio
4 canali uno italiano uno spagnolo uno tedesco uno inglese e avere un server multi lingua completo di quest

in locale_service.cpp

bool LocaleService_Init(const std::string& c_rstServiceName)

cambiate con

C++:
bool LocaleService_Init(const std::string& c_rstServiceName)
{
#ifdef ENABLE_MULTY_LANG // Raziel |maked a new Token for Global Lang|
    sys_err("NEW LANGUAGE GLOBAL ARE MAKED |WELL DONE!!|");
#else
    if (!g_stServiceName.empty())
    {
        sys_err("ALREADY exist service");
        return false;
    }

    g_stServiceName = c_rstServiceName;
#endif
    if ( "japan" == g_stServiceName)
    {
        __LocaleService_Init_JAPAN();
    }

cercate


string g_stServiceName;


cosi'

C++:
#ifdef ENABLE_MULTY_LANG // Raziel |maked a new Token for Global Lang|
extern string    g_stServiceName;
#else
string g_stServiceName;
#endif



cercate in config.h



enum { ADDRESS_MAX_LEN = 15 };



e aggiungete dopo

C++:
#ifdef ENABLE_MULTY_LANG // Raziel |maked a new Token for Global Lang|
extern std::string    g_stServiceName;
#endif



cercate 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


aggiungete dopo

C++:
#ifdef ENABLE_MULTY_LANG
string    g_stServiceName = "";
#endif



ora in config.cpp cercate

TOKEN("channel") { str_to_number(g_bChannel, value_string); continue; }


aggiungete dopo
C++:
#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



adesso in service.h add this

C++:
#define ENABLE_MULTY_LANG // Raziel |maked a new Token for Global Lang| sintax |LANG_GLOBAL: germany| config from core

1 server 1 database e tutti i locali che volete settandoli nei config di ogni ch

Bye ! enjoy . DarknesS
Gran bel lavoro compaesano <.<