1

I'm currently finalizing the setup of a multi-lingual site and everything to this point has benefited from variables handling language-specific items, but I do have a Safecracker form in the site that automatically serves up general error messages when, for example, a field has been left blank when it's required. I have the french language pack installed, but I'm somehow missing how I enable it so that when the site is being accessed via the french URL that the error messages served back by the Safecracker form also appear in French.

In index.php, I have the following (mirrored for english as well):

UPDATED CONFIG INFO BELOW

case "french.domain.com":
    $assign_to_config['site_url'] = 'https://french.domain.com';
    $assign_to_config['language'] = 'french';
    $assign_to_config['global_vars'] = array(
        "user_language" => "fr",
        "user_locale" => "en_US.UTF-8",
        "user_locale_date_format" => "%b %e %Y",
        "user_locale_event_date_format" => "%b %e %Y",
        "swap_site_label" => "English",
        "swap_site_url" => "https://english.cps.ca",
        "country_code" => "fr",
);

I just need a bit of help sorting out this final step.

2 Answers 2

1

You may also need to add:

 $assign_to_config['deft_lang'] = 'french';  
2
  • Thanks Anna. Yes, I discovered that with a little help from @stevieg_83. Now I just need to tackle creating a translated cartthrob errors language file for french! Commented Apr 11, 2013 at 18:23
  • De rien! Glad you got it sorted.
    – Anna_MediaGirl
    Commented Apr 11, 2013 at 19:59
0

I think:

$assign_to_config['language'] = 'french';

would work. Where variable value will be the language folder name as for the "system/expressionengine/language/french" the language variable value will be 'french'

1
  • I've tried that now. Unfortunately I've still getting english error messages on the french side of the site. Any other suggestions? Commented Apr 10, 2013 at 21:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.