PDA

View Full Version : Right>Left Characters


shavit
12-05-2011, 09:14
Hello, i Have a CS:S Server, and i would Like to have an Right to Left Characters Support, for Example, if im typing in arabic its going from the left to the right, same with hebrew or any language that going from right to left.

if i can have a plugin that fixing it, that will be awesome, thanks!

hleV
12-07-2011, 08:22
I doubt it's possible to do.

shavit
12-07-2011, 12:25
its possible, ive seen that in many servers!

Tylerst
12-07-2011, 19:09
It's probably not possible to reverse it as it's being typed, but it would be fairly easy to reverse a string* before it's printed to chat.
Sounds like your looking for the former though.


*That is to say, it's fairly easy to turn "This is a String" into "gnirtS a si sihT"

For example:


new String:inputstring[256], String:reversestring[256];
new length = strlen(inputstring)-1;
for(new i=0; i<=length; i++)
{
reversestring[i] = inputstring[length-i];
}
PrintToChatAll("%s", reversestring);

shavit
12-08-2011, 07:46
i dont know how to use it, you can give me a full .sp file?

Tylerst
12-08-2011, 17:00
Here's an example plugin.

Commands are sm_rtl and sm_rtl_team

Example usage in chat:

/rtl Hello there or /rtl_team Hello there
Would become ereht olleH for regular and team chat respectively

Note that which chat window you use does not matter, for example using /rtl_team in normal chat window will still print to team chat.

shavit
12-09-2011, 07:45
thank you so much!!!

edit: its not work with hebrew well, its doing weird characters!