9

I have a MSM set up with site A in english and site B in chinese. What I'd like is for the system messages on site B to show in chinese rather than english (think "Thanks - you're now logged in" etc, etc).

Does anyone know if that's possible and if so how?

Cheers in advance,

Jim

0
3

If you use this method then I have the perfect solution. the missing piece I was looking for so long!

In fact you have to find a way on how to trigger a) language related messages from add-ons, and b) language related messages AND emails from expressionengine itself.

you can do that by adding two variables within the index.php file, just before "END OF USER CONFIGURABLE SETTINGS":

a)

// $assign_to_config['language'] = 'deutsch';

(attention, when activating this, you have to translate all of your add-ons, or at least, duplicate the language folders. )

b)

// overrides the default language for expressionengine (use the name of the language folder)
$assign_to_config['deft_lang'] = 'deutsch';

this is much more important and will set the language of system messages and emails!

(for multilanguage emails you have to go to: "design -> message pages -> email notifications" and de-check the checkbox for each template: "Enable This Template? If disabled, this template will not be used. Instead, the message will be generated dynamically in each user's chosen language"

good luck! stefan

8

Check out the Custom System Messages addon: http://devot-ee.com/add-ons/custom-system-messages

This lets you move EE system messages into EE templates so you can have finite control over messages.

2
  • As far as I can see, this won't change the {content} of the messages - only the stuff surrounding them, right? – Jim Pannell Jan 7 '13 at 14:00
  • You can deliver custom error messages based on error action: pastie.org/1355088 – Anna_MediaGirl Jan 7 '13 at 16:03
3

We always use this Multi Language Module for things like these: http://devot-ee.com/add-ons/multi-language-module

This allows you to create "phrases" in your backend and provide different translations.

You can ouput these in your template like this:

{exp:multi_language:phrase index=“phrase_name”}

Depending on the user's language this will output the correct translation. The user’s language is determined by the url. So for a webpage at mysite.com/links/ the italian version will be at mysite.com/it/links/. This makes for easy navigation and setup in ExpressionEngine.

5
  • 1
    Does this work in EEs speciality templates though? I don't think tags are supported in those templates. – Jim Pannell Nov 23 '12 at 11:16
  • 3
    I f you want to redirect users to a specific page to let them know they're logged out, I wouldn't use EE's templates. With FreeMember you can redirect users to any page you want, where you can use the multi-language module. devot-ee.com/add-ons/freemember – janvl Nov 23 '12 at 11:20
  • That looks GREAT Janvi. Thanks for the heads up on that one. – Jim Pannell Nov 23 '12 at 11:28
  • if that answers your question, could you mark it as such ? :) – janvl Nov 23 '12 at 11:48
  • It doesn't really answer my question I'm afraid. I'm specifically talking about the language that EEs messages are displayed in (think what's in {content} in the speciality templates). – Jim Pannell Jan 7 '13 at 14:02
2

I don't think you need an add-on for this, you can set the default language per MSM site.

1

I'm with Media Girl on this one. I use Custom System Messages to display all error pages and i've never looked at another solution. It's simple and effective.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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