news letter dialogue

hassan kalach asked on September 26, 2017 09:44

so i added a subscribe to news letter to my website but i would like to change the dialogue that gets displayed after a user subscribes or in case the user already is registered how can i go that ? and can i do it with localization to have diffrent text related to the current site language

Correct Answer

Trevor Fayas answered on September 26, 2017 15:43

Drat, thought it would be right in the ascx. I dug into the ascx.cs, here's some resource strings:

  • NewsletterSubscription.FirstName
  • NewsletterSubscription.LastName
  • NewsletterSubscription.Email
  • NewsletterSubscription.Submit
  • NewsletterSubscription.ErrorEmptyFirstName
  • NewsletterSubscription.ErrorEmptyLastName
  • NewsletterSubscription.ErrorInvalidEmail
  • newslettersubscription.erroremptyemail
  • NewsletterSubscription.NoneSelected
  • Webparts_Membership_RegistrationForm.captchaError
  • NewsletterSubscription.Subscribed
  • General.BannedIP

Just pick the one that matches, and create a new resource string with that exact name :)

0 votesVote for this answer Unmark Correct answer

Recent Answers


Trevor Fayas answered on September 26, 2017 14:16

Most all Kentico web parts have their text I'm a localization string that you can overwrite just by creating a localization string matching it. Kentico prioritizes the custom localization string over the ones found in the.resx resource file in Kentico folder.

To find the right resource string, check the webpart layout tab and "create a new layout" (webparts - edit - layout tab - new). Then look at the code (the ascx that shows) and you should see the message localized control, copy the localization string and create a localized string with as matching key.

0 votesVote for this answer Mark as a Correct answer

hassan kalach answered on September 26, 2017 14:39

<asp:Label runat="server" ID="lblInfo" CssClass="InfoMessage" EnableViewState="false"
        Visible="false" />
    <asp:Label runat="server" ID="lblError" CssClass="ErrorMessage" EnableViewState="false"
        Visible="false" />

i guess this is the code resposnible of getting the info and error message for that web part but i got no idea to wich localization string their related

0 votesVote for this answer Mark as a Correct answer

hassan kalach answered on September 26, 2017 15:51

thats great thank you for your answer can i know how exactly you found these ?! NewsletterSubscription.Subscribed this one turns out the message that appears once a user is subscribed . but i did not find any string thats related to the error that comes up when the email is already registered.

thank you again for your help

0 votesVote for this answer Mark as a Correct answer

hassan kalach answered on September 26, 2017 15:57

NewsletterSubscription.SubscriberIsAlreadySubscribed thats the one :D i find it thank you .

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.