-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add support for internationalization. #209
Comments
@erikyo I don't have any experience with WordPress localization, do you know the basics so we can get started? Because as soon as we get the db test data filled we will want this in place so we can actually render notifications. |
This is one of the many nice things WordPress does for you, and you don't need anything else to apart adding the "languages" folder in your plugin and do this |
@erikyo because of how we decided to do the notificaton messages with |
Summary of thoughts from Discussion #113. I believe the translation of a notification has to happen when it is emitted and stored in the database for the following reasons:
|
yes i agree 100%. Currently it seems the most viable and functional option. If notifications are stored per user it is assumed that user knows the language he uses, so i don't see anything so disadvantageous in this proposal |
Perhaps this system shouldn’t be trying to tackle translations. It should provide a way for plugins to emit notifications. Leave providing translations to the plugins or new developments into how internationalization works. They are very different problems. It will be difficult to save actionable and possibly customizable messages in a format which can be dynamically rendered in another language, especially when depending on third party code that would be required to indefinitely remain on the system to render the notification. We could provide an API to query the languages preferences the users subscribed to a channel, and handle linking the correct translated message to the appropriate users when a notification is emitted. |
What problem does this address?
There currently isn't any support for translating the notification messages.
What is your proposed solution?
Add a basic translation file to the project.
Requirements
generate a POT file.
Currently running the cli command results in an error.
CLI error output
add translations for an initial set of messages.
The text was updated successfully, but these errors were encountered: