Skip to content
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

Detection of locale not possible with hardcoded property language #53

Open
hschaefer123 opened this issue May 10, 2024 · 0 comments · May be fixed by #60
Open

Detection of locale not possible with hardcoded property language #53

hschaefer123 opened this issue May 10, 2024 · 0 comments · May be fixed by #60

Comments

@hschaefer123
Copy link

hschaefer123 commented May 10, 2024

Creating a Notification in my custom service, i am not able to detect the initiator language, because Notifications are send by service and not by user.

For this reason, all Properties contain a Language flag to control, which NotificationType Template language should be used.

Currently, is is not possible to set the language.

utils.js

const properties = [
    {
      Key: "title",
>>>   Language: "en",
      Value: title,
      ...
    },

I think, this should be req.locale or additionally a config option in the in the alert api.

What do you think?

My current Workaround looks like this:

/*
data: {
    ID: ID,
    subject: subject,
    text: text
},
*/
Properties: [
    {
        Key: 'ID',
        Language: locale,
        Value: ID,
        Type: 'String',
        IsSensitive: false
    },
    {
        Key: 'subject',
        Language: locale,
        Value: subject,
        Type: 'String',
        IsSensitive: false
    },
    {
        Key: 'text',
        Language: locale,
        Value: text,
        Type: 'String',
        IsSensitive: false
    }
],

but your data option is more convenient!

Regards
Holger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant