Jump to content

Polish characters


Recommended Posts

Hello. I am learning to create metin2 servers. I used ETH2 INTERFACE in my first project. In the file introempire.py it is possible to add a description of the kingdoms. Since the project is in Polish, I want to add descriptions in this language.

introempire.py

kingdoms = {
	1 : {"name" : "Shinsoo",
		"desc" : [
			"Królestwo duchowej siły,",
			"gdzie panuje harmonia z naturą.",
			"Ludzie tego królestwa żyją",
			"w zgodzie ze sobą i otoczeniem,",
			"a ich sztuka walki opiera się na",
			"równowadze między ciałem i umysłem.",
		]},
	2 : {"name" : "Chunjo",
		"desc" : [
			"Królestwo, w którym sztuka walki",
			"jest w ciągłym rozwoju.",
			"Wojownicy z Chunjo zdobywają",
			"wiedzę i doświadczenie,",
			"by stać się najlepszymi",
			"wojownikami i strategami.",
		]},
	3 : {"name" : "Jinno",
		"desc" : [
			"Królestwo, w którym postęp",
			"technologiczny jest piorytetem.",
			"Dla ludzi z Jinno",
			"walka jest sztuka,",
			"w której wykorzystują najnowsze",
			"technologie, by osiągnąć zwycięstwo.",
		]},
}

 

ui_jack_kingdom.py:

(...)
{
	"name" : "text_kingdom_01_01", "type" : "text",
	"x" : 223 / 2 + 22, "y" : 155+18*0,
	"text_horizontal_align" : "center",
	"fontname" : "Tahoma:13",
	"color" : 0xffCECECE,
	"text" : "DEFAULT TEXT",
},
(...)

Unfortunately, the effect looks just like on the screen (https://metin2.download/picture/w4k6d0ClVNCumON7AHQ5X449vfx13aro/.png). How do I fix Polish characters so that they display correctly?

Thank you for your help!

 

Problem solved! I did not change the encoding in Notepad++ to ANSI. Please close the topic.

 

 

Edited by Resco
Problem solved
  • Metin2 Dev 2
  • Think 1
Link to comment
Share on other sites

Put your translations into locale_game.txt (in locale folder) and use it like localeInfo.YOUR_STRING -> use localeInfo inside root scripts (remember about import)

If you want text in uiscript (ui_jack_kingdom in your case) use locale_interface.txt, import uiScriptLocale and use it like. uiScriptLocale.YOUR_STRING

 

Example:

locale_interface.txt 
 

MY_TEXT[TAB]There goes your translation in polish


In your script:

import uiScriptLocale
(...)
{
	"name" : "text_kingdom_01_01", "type" : "text",
	"x" : 223 / 2 + 22, "y" : 155+18*0,
	"text_horizontal_align" : "center",
	"fontname" : "Tahoma:13",
	"color" : 0xffCECECE,
	"text" : uiScriptLocale.MY_TEXT,
},
(...)
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

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.