multilanguage system

Unico

Dedicated Member
Dedicated Member
Dec 15, 2007
230
1
64
hi all,

Anyone can post a guide here or send me by pm about how to change the script language for the server version king? do not say "using flags" or "need 2 envir" because i know it. But if you can post a guide on this would be very helpful

thanks
 

mapadale

Guest
hi all,

Anyone can post a guide here or send me by pm about how to change the script language for the server version king? do not say "using flags" or "need 2 envir" because i know it. But if you can post a guide on this would be very helpful

thanks
The same way as everyone else has to - TRANSLATE TO LANGUAGE OF CHOICE

Then have two Envirs with starting script to select language on login and script to point to which Envir is selected for language.
 
Last edited:
Upvote 0

Amenovis

Golden Oldie
Golden Oldie
Loyal Member
Jan 9, 2006
1,105
0
143
Germany
you not need 2 diffrent envirs you can do it also in each script same the question is only what you prefer.

i had in every script in each npc the same head. So what have i done:

Make txt files with names from language example german.txt and english.txt

than in the script make a check

#if
checknamelist ..... /german.txt
#goto @ger

#if
checknamelist ..../english.txt
#goto @eng

#elsesay
You have not choose a language
<German/@german>
<English/@english>
<Exit/@exit>

[@german]
#act
addnamelist german.txt
#goto @ger

[@english]
#act
addnamelist english.txt
#goto @eng

[@ger]
german text

[@eng]
english text

this way if you sort it you can add endless much languages i had 10 languages on 3.55 server system running and working. in my version it was also possible to choose language or change language over d menue. for that you need only that 3 commands

check namelist
addnamelist
dellnamelist
 
Upvote 0

Weikster

LOMCN Veteran
Veteran
Jan 21, 2009
421
11
44
36th chamber
you not need 2 diffrent envirs you can do it also in each script same the question is only what you prefer.

i had in every script in each npc the same head. So what have i done:

Make txt files with names from language example german.txt and english.txt

than in the script make a check

#if
checknamelist ..... /german.txt
#goto @ger

#if
checknamelist ..../english.txt
#goto @eng

#elsesay
You have not choose a language
<German/@german>
<English/@english>
<Exit/@exit>

[@german]
#act
addnamelist german.txt
#goto @ger

[@english]
#act
addnamelist english.txt
#goto @eng

[@ger]
german text

[@eng]
english text

this way if you sort it you can add endless much languages i had 10 languages on 3.55 server system running and working. in my version it was also possible to choose language or change language over d menue. for that you need only that 3 commands

check namelist
addnamelist
dellnamelist

Thats a really good idea, nice one! :thumbup1:
 
Upvote 0

Amenovis

Golden Oldie
Golden Oldie
Loyal Member
Jan 9, 2006
1,105
0
143
Germany
Yeah it is working BUT ATTENTION

Do not try that with a lower server from specs. what i mean now is simple:

As longer the scripts are and as more the server exe self must jump in the scripts it can make a server LAGGY !!! so if you use a server with example 1 Ghz and 512 Ram than it will lag like hell with more as 20 or 30 players.

If you use my way make sure you have minimum 2 Ghz and 1 or 2 GB Ram or it make no sense

The way mapa said also work

for that load a older server version from kaori and look for "#call" commands in that case you need only a header in each npc that call the script you need for the right language. that is a way to make short requests and get same result. in my eyes it is not so usefull cause i like it more all in one same time for make changes and get the over view (did a uk ppl say that over view ?!?! )

so you must know self both ways work but they have diffrent requires from your server systems!!!!
 
Upvote 0

Emeralld

Banned
Banned
Dedicated Member
Nov 13, 2009
73
0
33
Yeah it is working BUT ATTENTION

Do not try that with a lower server from specs. what i mean now is simple:

As longer the scripts are and as more the server exe self must jump in the scripts it can make a server LAGGY !!! so if you use a server with example 1 Ghz and 512 Ram than it will lag like hell with more as 20 or 30 players.

If you use my way make sure you have minimum 2 Ghz and 1 or 2 GB Ram or it make no sense

The way mapa said also work

for that load a older server version from kaori and look for "#call" commands in that case you need only a header in each npc that call the script you need for the right language. that is a way to make short requests and get same result. in my eyes it is not so usefull cause i like it more all in one same time for make changes and get the over view (did a uk ppl say that over view ?!?! )

so you must know self both ways work but they have diffrent requires from your server systems!!!!
It shouldn't lag at all on a 512mb system if the enter script is done correctly.

This should work also (In theory as not tested this).

This should give you a message at login to choose the language that you want to use, store your choice in a .txt and then when you login again it should read the script and then just proceed from their with the server language.


Code:
Add to 00Default.txt

[@language]
#CALL [System\language.txt] @language  [B]<THIS WILL CHECK IF ADDED OR AND CHOOSEN LANG>[/B]
Add script to system folder in quest diary

Code:
;;;; TEST SCRIPT FOR LANGUAGE SELECTION ;;;;
[@Language]
{
#IF
CHECKNAMELIST  ....\German.txt     [B]<THIS WILL SAVE INTO THE DIRECTORY OF THE SCRIPT>[/B]
CHECKNAMELIST  ....\English.txt[B]     <THIS WILL SAVE INTO THE DIRECTORY OF THE SCRIPT>[/B]
#ACT
<Exit/@exit>\
#ELSEACT
#GOTO @main1

[@main1]
#SAY
PLEASE CHOOSE YOUR LANGUAGE\
WÄHLEN SIE BITTE IHRE SPRACHE\\
<[ ENGLISH ]/@eng>\
<[ DEUTSCH ]/@dut>\

[@eng]
#IF 
ADDNAMELIST ....\English.txt
<Exit/@exit>

[@dut]
#IF
ADDNAMELIST ....\German.txt
<Exit/@exit>
}
;;;;;;
All you will need to do then is add the following to each script with both langauges in them.

Code:
[@main]
#IF
CHECKNAMELIST .....\English.txt
#ACT
#GOTO @main1
#ELSEACT
#GOTO @main2
You must remember though to change the @main for each script to main1 or main2 and leave the [@main] as per the above.
 
Upvote 0

Amenovis

Golden Oldie
Golden Oldie
Loyal Member
Jan 9, 2006
1,105
0
143
Germany
jepp work also it split only 2 parts and change not much m8

you seperate only the choose / Change language part

later he do all what my way do also @check... @goto...

in german is a sentence for it "Viele Wege führen nach Rom" (Manny way go to Roma)

i can also post a script for working flag system if one is interested but as normaly known txt system is better cause flags are only a special count available and txt files endless :)

and m8 your way make only 1 request seperate that change nothing from the lag problem you can only make it shorter if you integrate call command and seperate all textes also

in our example we have now 2 langauges main1 main2 but now think about 5 or 6 or as i had 10 languages in one script than you will agree that only the choose language part seperated brings not much :)
 
Upvote 0

Emeralld

Banned
Banned
Dedicated Member
Nov 13, 2009
73
0
33
jepp work also it split only 2 parts and change not much m8

you seperate only the choose / Change language part

later he do all what my way do also @check... @goto...

in german is a sentence for it "Viele Wege führen nach Rom" (Manny way go to Roma)

i can also post a script for working flag system if one is interested but as normaly known txt system is better cause flags are only a special count available and txt files endless :)

and m8 your way make only 1 request seperate that change nothing from the lag problem you can only make it shorter if you integrate call command and seperate all textes also

in our example we have now 2 langauges main1 main2 but now think about 5 or 6 or as i had 10 languages in one script than you will agree that only the choose language part seperated brings not much :)
If your using more than two langauges on the server, then you more than likely need to use two or three envirs depending on how many you use.

by only using the

check namelist
addnamelist
dellnamelist


Commands you are actually clogging up the server with useless crap all in one envir, especially on more than two or three languages. Also creating a script with endless commands in it, will also lag the server out as it's constantly have to go through the script each time to read the command.

The fastest and less laggy way is to use the #@CALL and flags.

Also on another point as well, if you are using multi scripts with diff languages. Then you certainly need to be using more than one server for this job, as you need the SQL server on one and the server files on the other.
 
Last edited:
Upvote 0

Amenovis

Golden Oldie
Golden Oldie
Loyal Member
Jan 9, 2006
1,105
0
143
Germany
lol i will not arguing with you but nope not true :)

in that moment where you have choosen an language he jump directly to it and is not interested in other jumps

so if you start with

[@main]
#if
checknamelist xyz (1st language)
#goto @xyz

#if
checknamelist xyz2 (2nd language)
#goto @xyz2

you do nothing else as with flags the diffrent is only that he not check in txt file he check in sql/memory

all other from the script get ignored only the link victim in that case example 1 get read out from script

[@xyz]
#say text or #call

and only here is the diffrent if you have 10 diffrent languages in same script to find the right place or to read out with call system.

with flags and commands you need same steps

example flags

[@main]
#if
check [010]
#goto @xyz (1st language)

#if
check [011]
#goto @xyz1 (2nd language)

But hey m8 its unimportend he asked for a way and he have now 3 or with your way 4 :) so if another one have another request to it say it if not have fun with it

with mapas way or Emerallds way or my way :)
 
Last edited:
Upvote 0

Emeralld

Banned
Banned
Dedicated Member
Nov 13, 2009
73
0
33
But if you are using scripts and the first is the check using your method, each script will contain 10 langauges for each text based script. Now it doesn't seem a lot at first, but when a script goes from being 5kb in size to70kb in size then yes it will slow the server down and create lag from the server.

Using the call command, you can actually call a script from anywhere and the script can still be kept at 5kb in size and lower the length of time it takes to actually read it.

The way I did it was for the script to be read on login, give the option to choose langauge and only use the scripts in question for that language, this is one reason for using more than one Envir. As you are still only reading a low sized file.

And I don't mean any offence by this, but please learn to read in future. As my name is Emeralld and not esmeralds, I find that very offensive......
 
Upvote 0

Amenovis

Golden Oldie
Golden Oldie
Loyal Member
Jan 9, 2006
1,105
0
143
Germany
lol sorry for name i have probs with it thats why i also ever say mapa for mapada.. i make that not extra rly.( i fixed that in upper posting)

and i have not said your way is wrong i said only it change nothing the call system is the one that needed lowest cpu and ram i have also said that. and i said if you use my way in your example 70 kb files and more do not do it with a server with specs like 1 Ghz and 512 Ram cause than it will lagg like hell.

so i have write that and you arguing for a way that change nothing and say the same i did before. so what now ?? maybe read the postings i had wrote before and tell me where is the diffrent roflmao.

and it still have changed nothing

big txt files (all in one) need higher server specs as small with call function
but for both one is diffently clear it change nothing if namelist commands or Flags
 
Last edited:
Upvote 0

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
I have it made with Quest ID but for 2 Lang it is ok so... for more Quest I have build a own Quest ID system.

Illusion Server Lang system looks so :

[@NPC_RedPlayer]
#IF
Check [208] 1
#SAY
____{FCOLOR/1}Excuse me, I dont sell something{FCOLOR/12}\
____{FCOLOR/1}to a criminal rabble like you.{FCOLOR/12}\\
____{FCOLOR/6}——————————————————————{FCOLOR/12}\
____{FCOLOR/6}»{FCOLOR/12}_<Cancel/@exit>_{FCOLOR/6}«{FCOLOR/12}\\
#ELSESAY
____{FCOLOR/1}Entschuldigung, aber ich Handel nicht{FCOLOR/12}\
____{FCOLOR/1}mit kriminellem Gesindel wie Euch.{FCOLOR/12}\
____{FCOLOR/6}——————————————————————{FCOLOR/12}\
____{FCOLOR/6}»{FCOLOR/12}_<Ausgang/@exit>_{FCOLOR/6}«{FCOLOR/12}\\

this way is easy and I have one Script for a NPC or something with 2 Lang.
 
Upvote 0

Amenovis

Golden Oldie
Golden Oldie
Loyal Member
Jan 9, 2006
1,105
0
143
Germany
yeah m8 work for 2 languages

in your case you use flag for english check and the else command take the other possibility that is not set by flag. only another way that also use direct text passages without call command.

with other words it is a system that was also named before flags change only that you use the else command for second language with more languages you need more flags or namelist txt files.

but now rly i think ppl that will use that see now how it is possible to realise it.

all ways working all ways are good in special cases.

one for seperate one for overview one for make it endless possible and collys way to make it fast and uncomplicated. choose your way or combinate them and your server can have languages as much as you wanna have :)
 
Upvote 0

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
If I need more languages I use my own Quest Flag System ^^ it can hold 9 check and not 2 like the old one. I use stored procedure ;-) with this I can use all DB and all Tables and use the Power of the Database Language.
 
Upvote 0

Amenovis

Golden Oldie
Golden Oldie
Loyal Member
Jan 9, 2006
1,105
0
143
Germany
yes i know with db its also possible :)

sql profs can do it also with the sql commands readvalue safevalue and so on but hey m8 that is your area and idas or inflicted hahaha my way was ever to find a way that work without for me extrem hard solutions *lol and we both know you are better in special scipting but hey here is a way or better some ideas from Emer... mapa... and me that not need special knowledge in sql manipulation :P
 
Upvote 0

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
I know Ameno ^^... I have post some SP Scripts and the way you can call from script now in Dev Section. I only hold the Server for a hand full Member but I don't work anymore on the Old system ;-) I love my new one more, get me more options as the Fuuu old one with Chinese Virus and Crap..
 
Upvote 0

Amenovis

Golden Oldie
Golden Oldie
Loyal Member
Jan 9, 2006
1,105
0
143
Germany
yeah i have seen but how would a german say "Bömische Wälder" or "Bahnhof, Koffer klauen, abhauen" :P

and i have at present not much todo so i do not wanna be a part of your team but hey if i can give you a helping hand maybe with a idea that make a complicated thing easy say and i try and btw i never steal ideas so i not take something from you. :P
 
Upvote 0