-
Notifications
You must be signed in to change notification settings - Fork 0
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
Enhancement: Translation using Resources file #1
Comments
It would be great. There are methods Before/After execute of a command so you can set the correct culture information based on config here. However I see that I'm using multiple base classes from Discord.Net/Discord.Net.Interactive libraries such as Do you need some help or guidance? |
I have been looking at the summary attribute and wondering how to localize those. They don't seem to like allowing non-certain text values. Also I am partial just to just letting the hosted location determine the localization, as I am not quite sure how to read from your config file. Also I am trying to find an efficient way of getting into the resx file and having to specify the locale every single time. I am considering an extension method somewhere perhaps. In addition concepts are a little more difficult when you apply them. |
Summary attribute can still remain as a key to a resources. Its not about the host, currently the bot is being used across a few guilds (servers - Discord terminology). Each guild can specify its own language. It has to be configurable so every guild can choose what language they would like to use. I found this package named Configuration is only about adding a new property e.g. |
I found a solution that you might be interested in. I would actually be more than happy to help implement and create a pull request to resolve. By using a resx file to hold string values, it can be translated. I would try to see if I can add the current culture information to your object and file. That way it will be able to be set while it is running via command, theoretically.
More about resx files.
https://docs.microsoft.com/en-us/dotnet/framework/resources/working-with-resx-files-programmatically
The text was updated successfully, but these errors were encountered: