[MEGA RELEASE]MultiLanguage System for Client

12/29/2013 19:54 .Eugen#1
----EN----

Hello , i decided to posted multilanguage system (maded for metin2dr)The system allow to change the language of your client,this system was created in 20-30 min .You only need a locale for each language.The implementation of this system is very simple, but i have made a videotutorial also .


----ES----

Hola , me decidi postear el sistema multi-idioma echo para metin2dr.Este sistema permite cambiar el idioma de tu cliente rapido,fue echo en 20-30 minutos.Solo se necesita un locale para cada idioma.La implementacion en si,es simple,pero hize un videotutorial por si tenei dudas al respecto.

Video Tutorial:


Source: [Only registered and activated users can see links. Click Here To Register...]
12/29/2013 20:00 Aze /..#2
Nice. Thx 4 share, it's very usefull.
12/29/2013 20:15 .Zekay™#3
wow ... very great ! thank you very much !
12/29/2013 20:17 MartPwnS#4
Drop something to the ground ;)
12/29/2013 20:17 NaOiZ#5
Nice :) And thanks for sharing
12/29/2013 20:24 Mr.Xhater#6
[Only registered and activated users can see links. Click Here To Register...]
12/29/2013 20:26 .Eugen#7
Quote:
Originally Posted by Mr.Xhater View Post
[Only registered and activated users can see links. Click Here To Register...]
You need a locale for each language.
12/29/2013 20:32 QuickFlameZ#8
rwwwr *___* Nice.
Kind regards
12/29/2013 20:36 Mr.Xhater#9
[Only registered and activated users can see links. Click Here To Register...]
12/29/2013 20:47 lollo_9_1#10
Quote:
"mega release"
I wanna show you something very funny:
Quote:
Originally Posted by dat cancer#1
Code:
import net		#unused
import snd		#unused
import locale	#unused
import ui
import uiTip	#unused
import dbg
import os
import app
> 2 days left until 2014
> NO ONE knows what is python
Code:
	def SAFE_SetEvent(self, func, *args):
		self.eventFunc = __mem_func__(func)
		self.eventArgs = args
		
	def SetEvent(self, func, *args):
		self.eventFunc = func
		self.eventArgs = args
SetEvent accepts a tuple of arguments so there's no need to create 4 defs like those below.
Quote:
Originally Posted by dat cancer#2
Code:
	def __Language_1(self):
		file = open("locale.cfg", "w")
 		file.write("10002 1252 en") 
		file.close()
		dbg.LogBox("The laguage of client was changed to English!")
		dbg.LogBox("Client will restart.")
		os.system('start Metin2.exe')
		app.Exit()
		self.Close()
	
	def __Language_2(self):
		file = open("locale.cfg", "w")
 		file.write("10002 1252 it") 
		file.close()
		dbg.LogBox("The laguage of client was changed to Iatly!")
		dbg.LogBox("Client will restart.")
		os.system('start Metin2.exe')
		app.Exit()
		
	def __Language_3(self):
		file = open("locale.cfg", "w")
 		file.write("10002 1252 de") 
		file.close()
		dbg.LogBox("The laguage of client was changed to Germany!")
		dbg.LogBox("Client will restart.")
		os.system('start Metin2.exe')
		app.Exit()
		
	def __Language_4(self):
		file = open("locale.cfg", "w")
 		file.write("10002 1252 es") 
		file.close()
		dbg.LogBox("The laguage of client was changed to Spanish!")
		dbg.LogBox("Client will restart.")
		os.system('start Metin2.exe')
		app.Exit()
I hope you'll appreciate this little advice. (there are more things I could add)
12/30/2013 11:33 HsNecro#11
Hi, your system is very nice but if i change language so serverinfo.py has this problem:
Code:
 if (locale.IsEUROPE() and app.GetLocalePath() == "locale/de"):
	STATE_NONE = "..."
And locale/de isnt change on locale/it Can you help me please? :D Thank you very much.
12/30/2013 11:43 lollo_9_1#12
Quote:
Originally Posted by HsNecro View Post
Hi, your system is very nice but if i change language so serverinfo.py has this problem:
Code:
 if (locale.IsEUROPE() and app.GetLocalePath() == "locale/de"):
	STATE_NONE = "..."
And locale/de isnt change on locale/it Can you help me please? :D Thank you very much.
Delete that if statement or do something like this: (or post that file)
Code:
 if (locale.IsEUROPE() and app.GetLocalePath() in ("locale/de","locale/en","locale/es","locale/it")):
	STATE_NONE = "..."
12/30/2013 18:54 *~.ιηνιη˘ιвℓє.~*#13
1230 18:51:00549 :: Failed to load script file : UIScript/PopupDialog.py
1230 18:51:00552 ::
ui.py(line:2773) LoadScriptFile
system.py(line:192) execfile
system.py(line:161) Run
system.py(line:176) __LoadTextFile__
system.py(line:64) __init__

LoadScriptFile!!!!!!!!!!!!!! - <type 'exceptions.AttributeError'>:'NoneType' object has no attribute 'split'
12/30/2013 19:05 #Saiirex#14
Wow, it's very helpfull
ty
02/10/2015 06:32 hsomy#15
How to translate quests?