locked
Multilanguage Email RRS feed

  • Question

  • User1423141334 posted

     I am creating a multilingual site. I create my resources files for each language and I reference in HTML and Code Behind, but now I have a doubt.

    I need to send an email with the same text for each language, but in the text there is a value that changes depending on the name of the username.
     
    Can I create a resource file that allow me to receive some variable?
     
    For example:
     
    Welcome to our page Mr [variable here] bla bla bla.......
     
    Thursday, July 2, 2009 10:26 PM

Answers

  • User-712408118 posted

     Hi Vendevelop,

    Yes you can create a resource string with place holder where you can pass a value based on different conditions.

    You can have a resource string like "Welcome to our page Mr {0}" with some resource key "WelcomeMessage"

    In the code behind before using resource string do it as follows:

    string parameterizedResString = string.Format(Resources.WebResources.WelcomeMessage, paramterVar);

    Now you use parameterizedResString, here paramterVar value will differ based on language or logic.

    Thanks,

    Suresh Kdam.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 3, 2009 1:15 AM