Sending emails to customers in their language

  • Hi Everyone

    I was wondering if it's possible to send emails to customers in their native language?
    Our Server/DB is in us_english but we have customers in Spain, Portugel, UK, India etc and we'd like to send them emails in their language.

    Is it possible to do this?  I've tried SET LANGUAGE but it doesn't seem to work for text.  It works for Dates.

    Thanks!

    Cathryn

  • Cathryn

    What doesn't work about SET LANGUAGE, and why do you even need it?  Can you not just put the messages in the various languages in a table and select from there for your e-mail?

    'Hindi', '??????'
    'English', 'Hello'
    'Spanish', 'Buenos días'
    'Portuguese', 'Bom dia'

    John

  • Hi John

    This is what I tried:

    DECLARE @TEXT varchar(50)
    SELECT @TEXT = 'HELLO'

    SET LANGUAGE 'Spanish'
    SELECT @TEXT

    It just gives me back 'HELLO'.

    I thought about storing the messages in a text and just pulling them but I was hoping I might be able to do it on the fly

  • That is simply not what set language does, all it's doing is saying you want some specific localization like date names/formats etc...  It's not going to take some random text, see that it's in english and then convert to the language you want.  Based on your example how would you ever be able to actually get 'HELLO' back after setting the language to spanish ðŸ˜€

  • OlyKLin - Monday, February 5, 2018 11:44 AM

    Hi John

    This is what I tried:

    DECLARE @TEXT varchar(50)
    SELECT @TEXT = 'HELLO'

    SET LANGUAGE 'Spanish'
    SELECT @TEXT

    It just gives me back 'HELLO'.

    I thought about storing the messages in a text and just pulling them but I was hoping I might be able to do it on the fly

    SET LANGUAGE works on system messages and data formats but won't translate other text. With system messages, it gets the alternative language value from sys.messages. Storing that text may be something you want to do, similar to sys.messages, but it depends on how much text it involves. 

    Sue

  • OlyKLin - Monday, February 5, 2018 9:30 AM

    Hi Everyone

    I was wondering if it's possible to send emails to customers in their native language?
    Our Server/DB is in us_english but we have customers in Spain, Portugel, UK, India etc and we'd like to send them emails in their language.

    Is it possible to do this?  I've tried SET LANGUAGE but it doesn't seem to work for text.  It works for Dates.

    Thanks!

    Cathryn

    You do require an user defined function for this ? If I'm not wrong, while working with different time zones, We'll create an user defined functions and

    convert the date time to user's timezone date time. We'd need to follow the same here.🙂🙂

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply