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.

MSM: Customizing error messages per site

June 18, 2013 10:30am

Subscribe [2]
  • #1 / Jun 18, 2013 10:30am

    Visiluna

    92 posts

    I am running an MSM install that drives three sites. I need to customize error messages, which I typically do by modifying variables in the appropriate language file.

    However, now I need the error messages to be site-specific.

    Site 1: This error has occurred. Follow these instructions.
    Site 2: This error has occurred. These instructions are different.

    Unfortunately, the language files appear to be tied to the base install and not the site.

    Is there any way to have separate language files for each site so I can fully customize the user experience?

    Thank you,
    Philip

  • #2 / Jun 18, 2013 2:06pm

    Bhashkar Yadav

    727 posts

    Hi Philip,

    Yes, in MSM same language will be loaded but here you can achieve with the following approach:

    - In the directory “system/expressionengine/language/” you can see “english” language folder containing all the the language files. Just copy and make another folder having same languages file. You can name it anything like: “english_site2”. This process is the same as having new language pack.

    - Now go to the index.php of site 2:
    put following code:

    $assign_to_config['language'] = "english_site2";

    This code should be placed anywhere above:

    require_once BASEPATH.'core/CodeIgniter'.EXT;

    Now customize the error message with the language files of “english_site2” for site 2.

    It would work for you.

  • #3 / Jun 18, 2013 2:09pm

    Visiluna

    92 posts

    That should work!

    Thanks!

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

ExpressionEngine News!

#eecms, #events, #releases