[Plugin] imessage - fast multilanguage strings
#21

Lawl, this looks amazing man
Reply
#22

Actually, what I want is to see the other non-ANSI/ASCII languages at the client side, but due to the coding problem, unless you're using UTF-8 coding on your computer (or SA-MP forces UTF-8 coding), I highly doubt it's possible.
Reply
#23

Great job. But can someone make a benchmark ?
Reply
#24

this is very interesting, it doesnt support formatting does it?

btw ******, you may want to scale down the images on YSI.tl a little. it takes a few secs to download for me.. and you scale them down on the page too.
Reply
#25

Quote:
Originally Posted by legodude
Посмотреть сообщение
this is very interesting, it doesnt support formatting does it?
It assumes the formatting within the framework of format() function:

istrings.txt:
Код:
[MULTISTRING]
en {Hello, %s!};
es {Hola, %s!};
gamemode.pwn:
PHP код:
new str[256];
new 
mes[256];
...
imessage(mes"MULTISTRING""en");
format(strsizeof(str), mes"John");
... 
But there are some types of string which can not be formatted in such a way. I still don't know the reason why, so it was said nothing about formatting possibility.


Quote:
Originally Posted by ******
Посмотреть сообщение
That doesn't answer the question of why it was done that way in the first place instead of researching existing solutions.
You are wrong, researching existing solutions had been done at first. The result is:
y_languages' format of text strings was designed for compatibility with y_ini. But it is hard to use for translators and redactors. For example, translation from French to Polish - it's a real mockery of translator because of different code pages. You can not have two strings (original and translation) in a single file.

P.S. I've added benchmarks +test code.
Reply
#26

Quote:
Originally Posted by Bombo
Посмотреть сообщение
For example, translation from French to Polish - it's a real mockery of translator because of different code pages. You can not have two strings (original and translation) in a single file.
if you use the correct UTF encoding you can just display all the characters you want in one file.


as for the benchmarks...
https://code.******.com/p/gpb/wiki/D...guageSpeedTest

in this example it creates a file in the format, of which each entry is identified by a hex number, so, to access the 1000th element, you would provide #0003E8 (or 10000th - #002710) in the get functions and voila .

Also little typo: "dinamic -> dynamic".
Reply
#27

this plugin don't supports strings?
Reply
#28

why in my server this script not working ?
Reply
#29

How can we know why ?
Reply
#30

what a mess i managed get it work btw by filterscripts thanks, but it shows up only the filterscript file.
everything that is in my script, i need to redeclare, why?

what is variable for current id player language? cause i need to redelcare a PlayerLang etc

it dosent show up a text

Код:
GetIString error: something wrong with language (NULL, etc.)
the code:
Код:
#include <imessage>
new PlayerLang[MAX_PLAYERS][4]; //player language

  new imes[254];
  imessage(imes, "WELCOME_MESSAGE", PlayerLang[playerid]);
  SCM(playerid, 0xC0C0C0FF, imes);
Reply
#31

Serbian is not spelled like this, it Srpski!
Reply
#32

Quote:
Originally Posted by Bombo
Посмотреть сообщение
It assumes the formatting within the framework of format() function:

istrings.txt:
Код:
[MULTISTRING]
en {Hello, %s!};
es {Hola, %s!};
gamemode.pwn:
PHP код:
new str[256];
new 
mes[256];
...
imessage(mes"MULTISTRING""en");
format(strsizeof(str), mes"John");
... 
But there are some types of string which can not be formatted in such a way. I still don't know the reason why, so it was said nothing about formatting possibility.




You are wrong, researching existing solutions had been done at first. The result is:
y_languages' format of text strings was designed for compatibility with y_ini. But it is hard to use for translators and redactors. For example, translation from French to Polish - it's a real mockery of translator because of different code pages. You can not have two strings (original and translation) in a single file.

P.S. I've added benchmarks +test code.
which types of strings cannot be formatted?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)