Hi ,
I cant make my site switch to the french langage ... fr files are present, event if some new messages are missing in them, the already present messages should be taken in account, shouldn't they ?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Fabrice@fabcol
Fabrice - 0 likes
- Fabrice@fabcol
Fabrice - 0 likes
- Marcus Povey@marcus
Marcus Povey - 0 likes
- alfalive@alfalive
alfalive - 0 likes
- Fabien Eychenne@feychenne
Fabien Eychenne - 0 likes
- volkanv@volkanv
volkanv - 0 likes
- Christophe@Christophe
Christophe - 0 likes
- Kevin Jardine@kevin
Kevin Jardine - 0 likes
- Christophe@Christophe
Christophe - 0 likes
You must log in to post replies.I changed the elgg_echo function to :
function elgg_echo($message_key, $language = "") {
global $CONFIG;
static $CURRENT_LANGUAGE;
if (!$CURRENT_LANGUAGE) {
$CURRENT_LANGUAGE = get_language();
} else {
$language = $CURRENT_LANGUAGE;
}
if (isset($CONFIG->translations[$language][$message_key])) {
return $CONFIG->translations[$language][$message_key];
} else if (isset($CONFIG->translations["en"][$message_key])) {
return $CONFIG->translations["en"][$message_key];
}
return $message_key;
}
And it works ... even if i cant see what was wrong with the original one ....
Oups, i forgot the incoming value of $language :)
so this one should be closed to a good one .... (at least it switch languages correctly on my side !)
function elgg_echo($message_key, $language = "") {
global $CONFIG;
static $CURRENT_LANGUAGE;
if (!$language) {
if (!$CURRENT_LANGUAGE) {
$CURRENT_LANGUAGE = get_language();
}
$language = $CURRENT_LANGUAGE;
}
if (isset($CONFIG->translations[$language][$message_key])) {
return $CONFIG->translations[$language][$message_key];
} else if (isset($CONFIG->translations["en"][$message_key])) {
return $CONFIG->translations["en"][$message_key];
}
return $message_key;
}
Hi, this should have been fixed in SVN. Essentially the problem was caused by a cache value being set but not checked for.
on my site the same problem. Thanks for this patch.
Thanks for the patch fabrice. It has been corrected http://trac.elgg.org/elgg/ticket/838
Hi friends,
What is the name of the file you made change above ?
Hello, th fil is here : engine/lib/languages.php
Christophe
Note that this problem has been fixed in 1.5 RC2 (available from the downloads page).
Much better to install that rather than making this single patch as RC2 fixes a number of issues.
Ok, works fine with rc2
Christophe