Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Recommended Posts

In this guide, we'll discuss how to implement a multi-language system in your game, allowing for a more inclusive environment for players from different linguistic backgrounds. This enhancement involves adding emoji support for chat messages and configuring the language settings effectively.

Initial Setup

To begin, you will need to implement the guideemoji-in-textline feature to allow emoji images in both chat messages and whispers. This integration can be found under "Multilanguage with KingDom."

Definitions

In your code archives, make sure to locate and define the necessary constants as shown below:

 
DEFINES:
This is the hidden content, please

Language Translation Process

If you want to translate texts, simply modify the ChatPacket commands to use LC_TEXT for the desired TRANSLATE_LANGUAGE. If you prefer to retain your default language, use DEFAULT_LANGUAGE.

Here’s how the adjustment may look:

 
This is the hidden content, please

However, do not alter the following lines:

 
This is the hidden content, please

If some chat types do not utilize LC_TEXT, additional adjustments may be necessary in your code.

Modifying Languages

To change the default language, navigate to length.h and adjust the following line:

 
This is the hidden content, please

Replace the number with the respective language identifier. To add or remove a language, search within Client files:

  1. PythonApplicationModule.cpp
  2. InstanceBaseEffect.cpp

Find the section marked // FOR CHANGE COUNTRY and modify the switch cases to align with the new language configurations. Ensure that the order corresponds with your database file common.lang.

Next, in Server length.h, locate the enumeration:

 
This is the hidden content, please

Here you will need to update these lines:

 
This is the hidden content, please

Make sure the value for TRANSLATE_LANGUAGE exceeds MAX_LANGUAGES.

Database Adjustments

In your database file common.lang, you can either remove or add languages as needed. It’s vital that the order in your database remains consistent with the adjustments made in PythonApplicationModule and InstanceBaseEffect of the Client.

Additional Notes

You will also want to include a user-friendly button to toggle between languages. While I haven't implemented this feature, it is a straightforward addition.

Overall, this multi-language system is tested and works efficiently. The framework used was based on an open-source language system found in a Turkish forum, which has since been refined.

By following this guide, you'll be able to empower your players through multilingual support, enhancing their overall gaming experience.

 

This is the hidden content, please

This is the hidden content, please

This is the hidden content, please

This is the hidden content, please

This is the hidden content, please

 

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.

spacer.png

Disable AdBlock
The popup will be closed in 5 seconds...