[mini release]multi lang system

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 53

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
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 stringg_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::stringg_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
stringg_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 !!
  • <li data-xf-list-type="ul">

[mini release]multi lang system​


Metin2 Lobby olarak sunucu geliştirme süreçlerinde dil desteği eksikliği nedeniyle birçok geliştirici sorun yaşamaktadır. Bu bağlamda, multi lang system adı altında geliştirilen bu sistem, farklı dillere kolay entegrasyon imkanı sunarak, Metin2 özel sunucularında çoklu dil desteğini mümkün kılmaktadır. Bu yazıda, bu sistemin detaylarına, avantajlarına ve kurulumuna değineceğiz.

Multi Lang System Nedir?
Multi Lang System, Metin2 özel sunucularında dil dosyalarının merkezi yönetimini sağlayan bir yapıdır. Sistem sayesinde, oyuncuların farklı dillerde oyun içi metinleri görüntülemesi sağlanabilir. Örneğin, bir sunucuda Türkçe, İngilizce ve Almanca gibi birden fazla dil desteklenebilir. Bu da hem daha geniş kitlelere hitap edebilmenizi sağlar hem de kullanıcı deneyimini ciddi anlamda artırır.

Sistem Özellikleri
Python GUI arayüzü sayesinde, dil dosyaları kolayca düzenlenebilir. Sistem, uiscript üzerinden entegre edilebilir ve sunucu tarafında dinamik olarak dil değişimi yapılabilir. Aynı zamanda, py root ve game core yapıları ile uyumlu çalışmaktadır. Sistemin temel amacı, client src ve server src üzerinde minimum müdahale ile çoklu dil desteğini aktif etmektir.

Neden Multi Lang System Kullanmalısınız?
Oyun sunucularınızda farklı ülkelerden oyuncular varsa, onların ana dilinde iletişim kurabilmek büyük avantaj sağlar. Bu sistem sayesinde, mesajlar, menüler ve oyun içi metinler her dile göre özelleştirilebilir. Ayrıca, sistem db core ile entegre çalışarak dil ayarlarını veritabanından yönetebilmenizi sağlar.

Kurulum ve Entegrasyon
Sistemin kurulumu oldukça basittir. Öncelikle pack dosyaları içine dil dosyalarınızı eklemeniz gerekir. Ardından, uiscript üzerinden dil seçim menüsünü entegre edebilirsiniz. Sistem, martysama tarafından geliştirilen yapılarla uyumlu çalışmaktadır. C++ system tarafında küçük değişikliklerle dil desteği aktif hale getirilebilir. Source edit işlemleri sırasında dikkat edilmesi gereken önemli noktalardan biri, mevcut sistemle çakışmamalarıdır.

Sonuç
Multi Lang System, Metin2 özel sunucularında kullanıcı dostu bir yapı sunar. Hem auth hem de game server tarafında desteklenen bu sistem sayesinde, çok dilli bir oyun ortamı oluşturmak artık çok daha kolay. Metin2Dev topluluğu olarak bu sistemin geliştirilmesine katkıda bulunan tüm kişilere teşekkür ederiz. Sistemi kullanarak sunucunuzu daha uluslararası bir alana taşımak artık mümkün.


[mini release]multi lang system​


Metin2 Lobby identifies that many developers face issues due to lack of language support during server development processes. In this context, the multi lang system provides easy integration for multiple languages, enabling multilingual support within Metin2 private servers. This article will cover the details, advantages, and installation of this system.

What is Multi Lang System?
The Multi Lang System is a centralized management structure for language files in Metin2 private servers. It allows players to view in-game texts in different languages. For instance, a server can support Turkish, English, German, and more. This enables reaching broader audiences and significantly enhances user experience.

System Features
With its Python GUI interface, language files can be easily edited. The system integrates through uiscript and allows dynamic language switching on the server-side. It is compatible with py root and game core structures. Its main goal is activating multi-language support with minimal intervention in client src and server src.

Why Should You Use Multi Lang System?
If your game servers have players from various countries, communicating with them in their native language offers significant advantages. With this system, messages, menus, and in-game texts can be customized per language. Additionally, the system works integrated with db core to manage language settings via the database.

Installation and Integration
Installing the system is quite straightforward. First, you need to add your language files into the pack files. Then, you can integrate the language selection menu via uiscript. The system works compatibly with structures developed by martysama. Small changes on the C++ system side enable language support activation. During source edit operations, one important point to consider is avoiding conflicts with existing systems.

Conclusion
Multi Lang System offers a user-friendly structure in Metin2 private servers. Thanks to this system supported on both auth and game server sides, creating a multilingual gaming environment is now easier. We thank all contributors involved in the development of this system within the Metin2Dev community. Using this system makes it possible to expand your server into a more international arena.
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Benzer konular

Geri
Üst Alt