-
Notifications
You must be signed in to change notification settings - Fork 382
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
feat: language support via locale
config
#96
Conversation
Thanks @vcgtz Looking forward to your changes. |
src/utils/config.ts
Outdated
@@ -22,6 +22,12 @@ const configParsers = { | |||
|
|||
return key; | |||
}, | |||
language(key: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be locale
. And in the validation, it should say "Must be a valid locale (letters and dashes/underscores)".
Also, would be nice to be able to refer the user to a list of locales. Do you know if there's a standard list somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it! 👍
I added a link to the Wikipedia list. I tried to get a link from the ISO organization but it was not possible. But I think the Wiki list is complete and as a reference could be good. Do you think that it's a good resource for reference?
Co-authored-by: hiroki osame <hiroki.osame@gmail.com>
locale
config
Sorry for the delay and thanks! |
@privatenumber Don't worry about it, it was my pleasure to contribute 👍 |
Very useful feature , would you like to confirm that there will be a hint on how to use this feature in the readme? Or am I honored to help with this? |
@STUTuna You're correct, that's how this feature works. I forgot to add it 🙈, but feel free to send a PR updating the docs with the instructions. |
This is an improvement for #69, this PR sets the language using the config command.
Examples:
Set Spanish
Set French
@privatenumber Can you take a look at this? I made the changes we discuss in the another PR, if you consider this is the right way to handle languages, I'll close the previous PR.