ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Languages for Guests

April 29, 2011 7:36am

Subscribe [2]
  • #1 / Apr 29, 2011 7:36am

    emagine media

    65 posts

    I am running into the same problem a few other people have, in that the site I have is in multiple languages, using a language switcher plugin.

    I have multiple folders generating multiple variables I can use through my site, like user_language, language code, and language name etc.

    All of these variables come in no problem, even for a guest, as the site is controlled by the domain and the index.php in the folder.

    The problem is someone is in a German version of the site, they submit forgotten password, it comes back in english, which doesn’t suit them at all. So, it seems like I could do this in the messages temaplate:

    {if '{language_code}' == 'en'}
    {name},
    
    To reset your password, please go to the following page:
    
    {reset_url}
    
    Your password will be automatically reset, and a new password will be emailed to you.
    
    If you do not wish to reset your password, ignore this message. It will expire in 24 hours.
    
    {site_name}
    {site_url}
    {if:else}
    
    Other Language
    
    {/if}

    But the email kicking back sends me the code rendered and everything in english. This was a feature request from a while ago in the forums, has it been addressed? I don’t want to go into hacking the core, but it has to work somehow.

    The languages come in once someone is signed in, but they wont need the forgotten password messages (or indeed any registration messages etc) once this happens, leaving me with a chicken and egg setup.

  • #2 / Apr 29, 2011 7:37am

    emagine media

    65 posts

    ** sorry posted this in EE1 forum on accident **

    I am running into the same problem a few other people have, in that the site I have is in multiple languages, using a language switcher plugin.

    I have multiple folders generating multiple variables I can use through my site, like user_language, language code, and language name etc.

    All of these variables come in no problem, even for a guest, as the site is controlled by the domain and the index.php in the folder.

    The problem is someone is in a German version of the site, they submit forgotten password, it comes back in english, which doesn’t suit them at all. So, it seems like I could do this in the messages temaplate:

    {if '{language_code}' == 'en'}
    {name},
    
    To reset your password, please go to the following page:
    
    {reset_url}
    
    Your password will be automatically reset, and a new password will be emailed to you.
    
    If you do not wish to reset your password, ignore this message. It will expire in 24 hours.
    
    {site_name}
    {site_url}
    {if:else}
    
    Other Language
    
    {/if}

    But the email kicking back sends me the code rendered and everything in english. This was a feature request from a while ago in the forums, has it been addressed? I don’t want to go into hacking the core, but it has to work somehow.

    The languages come in once someone is signed in, but they wont need the forgotten password messages (or indeed any registration messages etc) once this happens, leaving me with a chicken and egg setup.

  • #3 / Apr 29, 2011 7:19pm

    Brandon Jones

    5500 posts

    Hi emagine media,

    Those specialty email templates are not parsed by the full-blown template parser, so unfortunately that won’t work and this is still a feature request. More robust multi-language support is something that is on our radar, though. If you’d like I can move this over to the CodeShare Corner to see if there might be another approach?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases