KickClient Message translation
Hi folks
I can't figure out how to force a translated message on player kick. Translation file has been created and still showing me a English phrase. Can someone help me with that or maybe show me whats wrong with my code? PHP Code:
|
Re: KickClient Message translation
As explained on https://wiki.alliedmods.net/Translat...ge_in_a_Plugin, %t only works in functions that act directly on one or more clients, like PrintToChat. For FormatEx you need to use %T and pass the client index after the phrase, like so:
PHP Code:
PHP Code:
|
Re: KickClient Message translation
1. Use KickClient instead of KickClientEx.
2. Use %T instead of %t in Format functions for translations. Example: PHP Code:
|
Re: KickClient Message translation
Yeah i tried to change the code, what are you both suggest and still showing english translate.
OnAdminCheckPost force to show English lang maybe ? |
Re: KickClient Message translation
Ok so the Lang while connect to my server is 0 (getting by getclientlanguage) but after spawn it change to my native lang "pl" so engine force a lang to en????
Can someone tell me, how to change this ? |
Re: KickClient Message translation
The client doesn't send language information to the server until a little after connection, and if this is for CS:GO the client doesn't send the language information at all - SourceMod has to request it, so it isn't available until later in the connection process. Unfortunately there isn't anything you can do about this.
|
Re: KickClient Message translation
Lord Nightmare, you can create own mapping based on <geoip> (ip -> Country -> language prefix).
Of course, it will be very inaccurate. Still, better than nothing. There is also GeoIpCity. Also, you can create and auto-populate local database with information about (ip -> language prefix) when that info come to knowlegde to sm in later connection stage, so next time that info will be available for you. |
Re: KickClient Message translation
Dragokas yeah propably i will use a GeoIP for translations , sometimes you need to go compromise.
Thanks all for help and understatning. Cheers |
All times are GMT -4. The time now is 14:03. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.