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 associativeI hope you understand my text and problem.
Thank you for your help.
/ S