andsfonseca / dota2-rpc-client

Allows you to observe the status of your DotA 2 (Defense of the Ancients 2) match within the Discord, through the Rich Presence service. 🎮
https://andsfonseca.github.io/dota2-rpc-client/
MIT License
41 stars 8 forks source link

[Feature]: Use discord language instead of system language #5

Closed andsfonseca closed 2 years ago

andsfonseca commented 2 years ago

Are you on the latest version?

Is there a fix in progress related to your proposal?

Is your feature request related to a problem? Please describe the problem.

As explained in the title, the application should use the language provided by discord instead of using the system language.

Describe the solution you'd like

The discord SDK has a function to retrieve the language.

Dota 2 Patch

No response

Anything else?

No response

andsfonseca commented 2 years ago

Discord provides a method that lets you know the current language used by the user.

As described in this method GetCurrentLocale:

char locale[128];
this->core->ApplicationManager().GetCurrentLocale(locale);

Unfortunately, in my tests, even changing the language directly the default value is always en-US.

The feature will be implemented, but not used by default.

A new issue will be created for the user to manually choose the default language.