Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying more in details what GetClientLanguage does #332

Closed
wants to merge 2 commits into from
Closed

Specifying more in details what GetClientLanguage does #332

wants to merge 2 commits into from

Conversation

TheMadSword
Copy link
Contributor

No description provided.

@@ -60,6 +60,9 @@ native SetGlobalTransTarget(client);
/**
* Retrieves the language number of a client.
*
* By default that language number is representing the language
* that the client's Steam application is using.
*
* @param client Client index.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not necessarily true, however, it should be the language that the game is using.

By default, most Source games use the Steam client language, but at least a couple of them actually respect the game language set in Steam (rather than Steam UI language). By changing your text to "that the user's game client is using", it should be accurate for all.

@asherkin
Copy link
Member

Does this really belong in the function documentation at all? Is how SourceMod picks a language for a client relevant to the function manually retrieving that result?

We're somewhat lacking high-level documentation for the various systems, but it seems like this is either implementation detail or a note for the language/translation system as a whole (hardly anyone will be using this function directly).

@TheMadSword
Copy link
Contributor Author

@psychonic "By changing your text to "that the user's game client is using", it should be accurate for all."

That's not exactly true; try putting your CSS in German or Japanese for instance; GetClientLanguage will return the Steam language, since "cl_language english" is defined (if your Steam is in English) in CSS, even if the CSS game language (set in the properties of the game, accessible from the Steam game list) is set otherwise.

@TheMadSword
Copy link
Contributor Author

I changed it to not mention Steam nor the game client, as to avoid confusion.

@asherkin asherkin closed this Feb 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants