-
-
Notifications
You must be signed in to change notification settings - Fork 8
Language #64
Comments
I have no clue how to set this up, but once someone has done the groundwork I'm more than happy to go through switching all the strings for stuff like that :) |
I think we need to plan out how we're going to do this before we talk about how we're going to retrieve lang. You saw the video binary. lang is complex so before we start taking about using lang we should talk about the senerios that pop up in different languages that we need to account and make a system for. |
Honestly, I think worrying about the ins and out of different scenarios is a bit out of the scope of the project. I think a simple system where each string has value placeholders would be okay to do. |
If we want to have proper lang just replacing strings dosn't work |
It will for the most part. I think I have some good ideas on utils which can allow for flexibility also |
Time util classSo we have two methods This can use special fields we set in the lang file like This means that we can create a good util on how time is represented. |
Closing this issue as the PR is underway. For reference, we decided to use the http://site.icu-project.org/ to format our language properly. |
So a few meetings ago, we decided that we would implement a language system due to the fact @mrjvs will be doing the same on the website.
Since we already use YAML for our config, I think we should do the same for the language. This will allow for the easy specification of strings (Unlike something like JSON) and also easily allow nesting if so needed.
To access the language string, I think a helper function in the CommandContext will be very helpful and sensible to do. A method like
context.i18n(String key)
will allow easy access to lang strings without having to put a long reference. (I18n being a shortening of internationalisation)The text was updated successfully, but these errors were encountered: