AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Multi-lingual Support: The 'target' Parameter (https://forums.alliedmods.net/showthread.php?t=17328)

Brad 08-29-2005 18:13

Multi-lingual Support: The 'target' Parameter
 
I'm a bit confused about what happens when I use the different options for the 'target' parameter when using the multi-lingual support.

Quote:

Originally Posted by Scripting Tutorial in Documentation
Let's break this down. For each %L that appears, we need at least two parameters. The first parameter is the TARGET. This must be a player id, LANG_SERVER (meaning show in the server's native language), or LANG_PLAYER. LANG_PLAYER is a special modifier that should only be used when sending a message to all players - it means "show in every player's native language". The second parameter is the key string that identifies the language phrase to translate. Lastly, if the translated string requires any parameters itself (ours needs %d, one integer), that must be added as well.

I've been using LANG_PLAYER everytime I want to show text to 1 or more players. After rereading the documentation, I'm not sure if that's a good idea. According to what I quoted above, I believe I should be using the player's ID when I'm sending text to a single player. If I did that, would the text be displayed in that player's language?

In the following code, does using LANG_PLAYER hurt anything even though I'm sending the message to a single player?
Code:
client_print(id, print_chat, "[Restrict Names] %L", LANG_PLAYER, "REASON_RENAMED_SUM")
I'm just confused. Anyone have some light for me?

Zenith77 08-29-2005 18:58

I dont know...try pming some of the translators...i belive they would know...or one of the mods...

Hawk552 08-29-2005 19:04

Quote:

Originally Posted by Zenith77
I dont know...try pming some of the translators...i belive they would know...or one of the mods...

Even though I'm contradicting myself by saying this, do not post if you have nothing decent to contribute.

Brad 08-29-2005 21:37

Hawk, that's exactly what I was thinking. How sad is it to post a response to a question essentially saying, "I don't know."? That's a rhetorical question.

I can only imagine that the people Yuri/Zenith/HisNextAlias cited actually read the boards too and would jump in if they had relevant information. The reason I didn't PM anyone that might know is that I thought the discussion in this thread might be of value to others. That's one of the main purposes of the forums; to share information with others. So Zenith, please STFU. You're not being helpful.

Now please... No more off-topic or non-contributing responses in this thread.

teame06 08-29-2005 22:17

The only time you use LANG_PLAYER is when you do a client_print(0, print_chat.... which it will send it to everyone in there own language

When you do a single person ie client_print(aIndex, print_chat, "%L", aIndex, "TA_WARNING_ADMIN_MSG", damage). You use the id of the player.

Found this out when doing atac ML stuff. Some time it wouldn't show in the correct languages when it was incorrectly used

Brad 08-29-2005 23:04

Thanks teame06, I appreciate your contribution.

BAILOPAN 08-30-2005 00:42

Note, you also use LANG_SERVER when doing the server's native language.

See the topic about ML in the "Helpful Stuff" sticky.

Brad 08-30-2005 09:02

Thanks for chiming in Bailopan.

Quote:

Originally Posted by BAILOPAN
Note, you also use LANG_SERVER when doing the server's native language.

When would one actually want to do this?

[EDIT]
And just like that, I figured out why one might want to use LANG_SERVER. In my case, I'm writing to the AMXX log file which obviously isn't associated with any player. Therefore, the only choice available to me is LANG_SERVER.
[/EDIT]


Quote:

Originally Posted by BAILOPAN
See the topic about ML in the "Helpful Stuff" sticky.

Negative. Though I didn't investigate very far, I saw nothing re: ML in the "Helpful Stuff" sticky.

Based on what I had read in the documentation, I thought I knew what I was supposed to do but I needed someone to hug me and tell me I was right. teame06 gave me the hug.


All times are GMT -4. The time now is 14:29.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.