Multi language script suggestion
#1

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?
Reply
#2

Read this tutorial by ****** about how to use y_text and y_languages.


Cheers!
Reply
#3

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)