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.

how can i have "redirect" pages in multiple languages?

August 31, 2010 10:47am

Subscribe [4]
  • #1 / Aug 31, 2010 10:47am

    phoebe_reed

    82 posts

    are there language files somewhere for the redirect messages, like “thank you!  you are now logged out”, etc?  I know where to go to design them, but can’t figure out how to translate the {content} that is put into them.

    We have a tri-lingual site, and I’d love to be able to have those messages in the right language for people.

    Thanks!


    -p

  • #2 / Aug 31, 2010 4:40pm

    Ingmar

    29245 posts

    Have you checked the language files? The default pack “English” in the “Languages” folder.

  • #3 / Sep 07, 2010 5:43pm

    phoebe_reed

    82 posts

    Yes, thanks, I found the messages there.

    My question now is ... I have the same site showing in english, french and spanish.  I am using a global variable “country_code”, and carry it in the URL, to tell the site what text to display or what to pull from a weblog.

    However, I need to get the redirect message, like “Thank you!  You are now logged in” to be using other languages.  I have installed the french an spanish language packs….

    How do I tell my site to use the correct language pack?  It needs to work without user login, because some users will not be members, but will still submit forms and see the redirect messages, etc.

    I think I’m missing something basic, but not sure what….

    Thanks,
    Phoebe

  • #4 / Sep 08, 2010 4:39am

    John Henry Donovan

    12339 posts

    Phoebe,
    the language packs are only for the backend.

    What I have recommended in the past is install the Custom System Messages add-on which lets you define which template will be used for your error pages, instead of the Speciality Templates that are only editable within the Control Panel.

    Now you can do you own language switching in the templates of your choosing for the errors using global variables or whatever method you are using.

  • #5 / Sep 08, 2010 11:47am

    phoebe_reed

    82 posts

    Thanks for the info, I will probably use that.

    So I guess there is no (free) method in EE to be able to have multiple choices of redirect messages?

    -p

  • #6 / Sep 08, 2010 12:13pm

    phoebe_reed

    82 posts

    Nope, I don’t think this works for us.  I just downloaded the extension, but it seems to only work for error messages.  We are most concerned with the Registration and Login redirects, and also Form confirmation (success as well as error) messages.  Is there a plugin that allows me to use custom templates for these messages or is there a method in EE for me to adjust the messages based on a global variable?  How have other multi-langauge sites handled this?  There must be a solution!

    -phoebe

  • #7 / Sep 08, 2010 4:34pm

    Ingmar

    29245 posts

    Unfortunately I am not aware of a ready-made solution here. I’ll move this thread to the CodeShare Corner for further discussion and brainstorming.

  • #8 / Sep 09, 2010 4:30pm

    phoebe_reed

    82 posts

    Before we bought EE, we were assured that multiple language sites are not a problem.. and I’ve been able to work out all my translation and language needs for the site pretty easily.

    But there must be a way that someone has worked out to have the “Thank you! YOu are now logged in” message to show in english, french or spanish, based on a global variable.  ??  I wonder how other sites have done it… it seems like a basic requirement for a multi-language site.  Hm…..

    Haven’t seen anything addressing teh member logged in, logged out, redirect screens.  Just the error screens…..

    thanks for any help!  I know there is a solution, I just have not figured it out yet!

    -p

  • #9 / Jan 25, 2011 6:27pm

    maxbato

    42 posts

    Phoebe,
    the language packs are only for the backend.

    What I have recommended in the past is install the Custom System Messages add-on which lets you define which template will be used for your error pages, instead of the Speciality Templates that are only editable within the Control Panel.

    Now you can do you own language switching in the templates of your choosing for the errors using global variables or whatever method you are using.

    Please expand on this. Clearly there are messages that are printed out to the front end within the language packs. (i.e. Invalid password, Field is required, etc….)

    I have the Custom Sys Messages extension installed. However like the OP asks, within the custom templates, how would I go about switching the language pack to let say “Japanese” to display error messages back to the user upon login or form sumbissions. Here is what Im trying to convey.


    Custom User Message Template:

    Somehow we need to use a conditional to use a different language pack.
    {if {country_code} =="jp"}
    {lang_pack = "japanese"}
    {if:else}
    {lang_pack = "english"}
    {/if}
    
    {embed="inc/top" loc="home" page_title="Error"}
    {meta_refresh}
    
    <div class="content">
    <h1>{heading}</h1>
    
    
    {content}
    
    {link}
    {action}
    </div>
    {embed="inc/bottom" loc="home"}

    Even if we have to surround each variable (heading, content, link) that would be fine, just point us in the right direction or at least tell us it is not possible so we can let our clients know.

    Thanks

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

ExpressionEngine News!

#eecms, #events, #releases