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.

Translate system ouput

November 29, 2010 8:03am

Subscribe [4]
  • #1 / Nov 29, 2010 8:03am

    Silentium

    19 posts

    Hi.

    I’m working on a multilanguage and have a big problem. I can’t, in any way, translate system messages that’s being output in the front-end, eg “thanks you” message for newsletter signup and the email being sent to the signed up visitor.

    The language works fine in the front-end. But I have tried in hours to get the system messages to change to the language the visitor is on.

    I have tried with the translate utility in EE controllpanel, tried creating a new folder in system/expressionengine/language and translate the files need translated and I have alot tried DL a 100% translated language from the language file here on EE website.

    I can get anything to work.

    To check the lang on the front-end, that the visitor is on, I use this in my index.php

    $uri_parts = explode('/', $_SERVER['REQUEST_URI']);
         if(empty($uri_parts[1])) {
             $uri_lang = 'en';
         } else {
             $uri_lang = $uri_parts[1];
             switch($uri_lang) {
                 case en:
                     $lang = 'english';
                 break;
                 case sv:
                     $lang = 'svenska';
                 break;
             }
         }
         
        $assign_to_config['template_group'] = '';
        $assign_to_config['template'] = '';
        $assign_to_config['site_index'] = '';
        $assign_to_config['site_404'] = '';
        $assign_to_config['global_vars'] = array(
            "country_code" => $uri_lang,
            "language" => $lang
        ); // This array must be associative

    I hope you understand my text and problem.

    Thank you for your help.

    / S

  • #2 / Nov 29, 2010 8:31am

    Sue Crocker

    26054 posts

    Silentium, can you manually change languages from inside of the control panel?

  • #3 / Nov 29, 2010 8:51am

    Silentium

    19 posts

    I can change the language in the controllpanel. In “admin -> general configuration” and in my own profil settings.

    When I installed the language from the EE site, I also tried to set the language in the controllpanel in both admin and my profile. The controllpanel got translated right but the email sent out from the site and the thank you message for signup on a newsletter were still in english.

  • #4 / Nov 29, 2010 9:17am

    Sue Crocker

    26054 posts

    Which version/build of EE2.x are you working with? You can find that at the bottom of any control panel page in the footer.

    Are you using any sort of third party add-ons?

    Do you need both English and Swedish?

  • #5 / Nov 29, 2010 9:30am

    Silentium

    19 posts

    I’m using EE 2.1.1 build 20101020

    The only third party add-on I have is structure.

    Swedish is only the test lang I use right know. The site will have around 10 languages in the future.

  • #6 / Nov 29, 2010 9:35am

    Sue Crocker

    26054 posts

    So when you offer a signup page, you need different languages to send out the welcome message, right?

  • #7 / Nov 29, 2010 9:46am

    Silentium

    19 posts

    I have a form where visitors can signup for the newsletter (see image 1)

    After they have pressed the “submit” button they get a thank you message (see image 2) and they also get an email with a confirmation link (see image 3).

    It it this thanks you message and the emails that the system gives the user that I need translated.

  • #8 / Nov 29, 2010 4:00pm

    Ingmar

    29245 posts

    Have you considered using one of the available third-party add-ons? This might be the easiest option.

  • #9 / Nov 30, 2010 4:31am

    Silentium

    19 posts

    Hi,

    I can find any add-on that do want I want.

    The thank you message and the email text that I want translated is in the “/system/expressionengine/language/english/mailinglist_lang.php”

    No plugin that I find translate this and I have tried in all the ways explained above without result….

  • #10 / Nov 30, 2010 9:20am

    Sue Crocker

    26054 posts

    Actually, I think there’s a bug in there somewhere. I set my system preference to be French, but the welcome letter comes in English even then. The registration form is in French, and the translation has the right codes in it for the replacement text.

  • #11 / Nov 30, 2010 9:23am

    Silentium

    19 posts

    Yes, it has to be a bug, but where…

    Just like you did now have I tried with Germen with the same result.

  • #12 / Nov 30, 2010 3:49pm

    Ingmar

    29245 posts

    Silentium, we’re trying to reproduce this internally, this is what Sue meant. Thanks for your patience.

  • #13 / Dec 06, 2010 7:05am

    Silentium

    19 posts

    Are you able to reproduce this? Is it a bug? And if that so, is it in your bug tracker and is there any idea of when it can be fixed?

  • #14 / Dec 06, 2010 4:41pm

    Ingmar

    29245 posts

    I am checking. Thanks for your patience.

  • #15 / Dec 14, 2010 6:07pm

    Ingmar

    29245 posts

    Can you please try to go to CP > Design > Message Pages > Email Notifications and uncheck “Enable This Template?” as appropriate? EE should then use the language packs on a per-user basis.

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

ExpressionEngine News!

#eecms, #events, #releases