Skip to content

Detection of locale not possible with hardcoded property language #53

@hschaefer123

Description

@hschaefer123

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions