25.03.2013, 23:54
Quote:
this is very interesting, it doesnt support formatting does it?
|
istrings.txt:
Код:
[MULTISTRING] en {Hello, %s!}; es {Hola, %s!};
PHP код:
new str[256];
new mes[256];
...
imessage(mes, "MULTISTRING", "en");
format(str, sizeof(str), mes, "John");
...
Quote:
That doesn't answer the question of why it was done that way in the first place instead of researching existing solutions.
|
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.