Phil25 / RTD

Roll The Dice SourceMod plugin for Team Fortress 2
GNU General Public License v3.0
56 stars 20 forks source link

[Feature Request] Use client's language instead of server's language when showing translations #44

Closed Tiagoquix closed 8 months ago

Tiagoquix commented 3 years ago

I see that this plugin uses the server language (LANG_SERVER) instead of a function like this. What the LANG_SERVER does is basically use this setting instead of using the client's language.

Can you change the plugin in a way that it shows the translated phrases based on the client's language and not on the server language? This is what most plugins do.

Thanks in advance.

Tiagoquix commented 3 years ago

There is even an option in the core.cfg file that is related to my issue/feature request.

https://github.com/alliedmodders/sourcemod/blob/master/configs/core.cfg#L76

    /**
     * Enables or disables whether SourceMod reads a client's cl_language cvar to set 
     * their language for server-side phrase translation.
     *
     * "on"     - Translate using the client's language (default)
     * "off"    - Translate using default server's language
     */
    "AllowClLanguageVar"        "On"
MAGNAT2645 commented 3 years ago

@Phil25, just replace LANG_SERVER with client index, that's all :smiley:

Tiagoquix commented 8 months ago

@Phil25 Would it also be possible to have the effects' names be translatable per language as well?

Phil25 commented 8 months ago

@Phil25 Would it also be possible to have the effects' names be translatable per language as well?

I've taken a brief look at it per #49 and translating perk names comes with a unique set of challenges. I haven't come to a conclusion yet but I doubt I will support it.