Multi language script suggestion - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Multi language script suggestion (
/showthread.php?tid=533265)
Multi language script suggestion -
kadaradam - 23.08.2014
Hello guys. I'd like to add more languages to my server, but i don't like the normal style with if statemens, and etc..
Код:
if (gLanguage[playerid] == LANG_ENG )
SCM()...
else
SCM()..
I just dont like it, cuz it messes up the code, it does not look good for me. So i tought it would be cool to read the language files from the scriptfiles folder. Every language would have an own file. But i dont know how should i script it, cuz the speed is very important here. I was thinking to script it with the GVar plugin. i compared the speed with the SendClientMessage function and it was way more slower. (I know it wont be faster or equal, but it was slow)
So any suggestion how should i script it?
Re: Multi language script suggestion -
theLegion - 23.08.2014
Read
this tutorial by ****** about how to use y_text and y_languages.
Cheers!
Re: Multi language script suggestion -
kadaradam - 23.08.2014
Thanks, but i already saw that tutorial. This was the first one what i tried. But when i compiled my gamemode the size of it was 9x bigger.
Size with y_text and y_languages: 5 332 kb
Size without these includes: 586 kb
It uses a lot of source from the memory. Which is bad, cuz my internet speed is sucks. It takes minutes to upload 1-2 MB to the host.