Creating email Notifications in Multiple Languages
To create custom email notifications in multiple languages, you modify the filegateway_notification.properties file to define the notifications. Then you modify the templates provided with Sterling File Gateway 2.2.3.
filegateway_notification.properties File
This is an example of the filegateway_notification.properties file:
filegateway.email.msg1=You are receiving this notification because you have
subscribed to this event code and you are the {0} on this route.
filegateway.email.msg2=The following File Gateway routing event occurred
filegateway.email.eventDetailHdr=Route Event Details:
filegateway.email.eventCode=Event Code:
filegateway.email.eventMessage=Event Message:
filegateway.email.dataflowId=DataFlowId:
filegateway.email.producer=Producer:
filegateway.email.consumer=Consumer:
filegateway.email.roleProducer=Producer
filegateway.email.roleConsumer=Consumer
filegateway.email.username=Username:
filegateway.email.filename=Filename:
filegateway.email.producerFilename=Producer Filename:
filegateway.email.consumerFilename=Consumer Filename:
filegateway.email.timestamp=Timestamp:
filegateway.email.hyperlinkMsg=Use the link below to sign into your FileGateway
Suite instance:
filegateway.email.myFGHyperlinkMsg=Use the link below to sign into your
myFileGateway Suite instance:
filegateway.email.unavailable=None
Administrators Template
To create email notifications in multiple languages for Administrators, use this template:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="yes" encoding="UTF-8" media-type="text/plain;charset=UTF-8;"/>
<xsl:template match="/">
<xsl:apply-templates select="FgRouteEvent"/>
</xsl:template>
<xsl:template match="/FgRouteEvent">
<xsl:value-of select="filegateway.email.msg2"/>
<xsl:text>
</xsl:text>
<xsl:text>
</xsl:text>
<xsl:value-of select="filegateway.email.eventDetailHdr"/>
============================================================================== <xsl:text>
</xsl:text>
<xsl:value-of select="filegateway.email.eventCode"/><xsl:text> </xsl:text><xsl:value-of select="EventCode"/><xsl:text>
</xsl:text>
<xsl:value-of select="filegateway.email.eventMessage"/><xsl:text> </xsl:text><xsl:value-of select="EventMessage"/><xsl:text>
</xsl:text>
<xsl:value-of select="filegateway.email.dataflowId"/><xsl:text> </xsl:text><xsl:value-of select="DataFlowId"/><xsl:text>
</xsl:text>
<xsl:value-of select="filegateway.email.producer"/><xsl:text> </xsl:text><xsl:value-of select="Producer"/><xsl:text>
</xsl:text>
<xsl:value-of select="filegateway.email.consumer"/><xsl:text> </xsl:text><xsl:value-of select="Consumer"/><xsl:text>
</xsl:text>
<xsl:value-of select="filegateway.email.username"/><xsl:text> </xsl:text><xsl:value-of select="Username"/><xsl:text>
</xsl:text>
<xsl:value-of select="filegateway.email.filename"/><xsl:text> </xsl:text><xsl:value-of select="Filename"/><xsl:text>
</xsl:text>
<xsl:value-of select="filegateway.email.timestamp"/><xsl:text> </xsl:text><xsl:value-of select="Time"/>
============================================================================== <xsl:text>
</xsl:text>
<xsl:value-of select="filegateway.email.hyperlinkMsg"/><xsl:text>
</xsl:text>
<xsl:value-of select="TargetURL"/><xsl:text>
</xsl:text>
</xsl:template>
</xsl:stylesheet>
Partners Template
To create email notifications in multiple languages for Partners, use this template:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="yes" encoding="UTF-8" media-type="text/plain;charset=UTF-8;"/>
<xsl:template match="/">
<xsl:apply-templates select="FgRouteEvent"/>
</xsl:template>
<xsl:template name="fill-placeholder">
<xsl:param name="placeholder-text"/>
<xsl:param name="replacement-text"/>
<xsl:value-of select="concat(substring-before($placeholder-text, '{0}'), $replacement-text, substring-after($placeholder-text, '{0}'))"/>
</xsl:template>
<xsl:template match="/FgRouteEvent">
<xsl:if test='not( "consumer" = Role )'>
<xsl:call-template name="fill-placeholder">
<xsl:with-param name="placeholder-text" select="filegateway.email.msg1"/>
<xsl:with-param name="replacement-text" select="filegateway.email.roleProducer"/>
</xsl:call-template>
</xsl:if>
<xsl:if test='not( "producer" = Role )'>
<xsl:call-template name="fill-placeholder">
<xsl:with-param name="placeholder-text" select="filegateway.email.msg1"/>
<xsl:with-param name="replacement-text" select="filegateway.email.roleConsumer"/>
</xsl:call-template>
</xsl:if>
<xsl:text>
</xsl:text>
<xsl:text>
</xsl:text>
<xsl:value-of select="filegateway.email.msg2"/><xsl:text>
</xsl:text>
<xsl:value-of select="filegateway.email.eventDetailHdr"/>
=============================================================================== <xsl:text>
</xsl:text>
<xsl:value-of select="filegateway.email.eventCode"/><xsl:text> </xsl:text><xsl:value-of select="EventCode"/><xsl:text>
</xsl:text>
<xsl:value-of select="filegateway.email.eventMessage"/><xsl:text> </xsl:text><xsl:value-of select="EventMessage"/> <xsl:text>
</xsl:text>
<xsl:value-of select="filegateway.email.producer"/><xsl:text> </xsl:text><xsl:value-of select="Producer"/><xsl:text>
</xsl:text>
<xsl:value-of select="filegateway.email.consumer"/><xsl:text> </xsl:text><xsl:value-of select="Consumer"/> <xsl:text>
</xsl:text>
<xsl:if test='not( "consumer" = Role )'>
<xsl:value-of select="filegateway.email.producerFilename"/><xsl:text> </xsl:text><xsl:value-of select="Filename"/>
</xsl:if>
<xsl:if test='not( "producer" = Role )'>
<xsl:value-of select="filegateway.email.consumerFilename"/><xsl:text> </xsl:text><xsl:value-of select="ConsumerFilename"/>
</xsl:if>
<xsl:text>
</xsl:text>
<xsl:value-of select="filegateway.email.timestamp"/><xsl:text> </xsl:text><xsl:value-of select="Time"/>
=============================================================================== <xsl:text>
</xsl:text>
<xsl:value-of select="filegateway.email.myFGHyperlinkMsg"/><xsl:text>
</xsl:text>
<xsl:value-of select="TargetURL"/>
<xsl:text>
</xsl:text>
<xsl:text>
</xsl:text>
<xsl:text>
</xsl:text>
<xsl:text>
</xsl:text>
<xsl:text>
</xsl:text>
<xsl:text>
</xsl:text>
<xsl:text>
</xsl:text>
</xsl:template>
</xsl:stylesheet>