Commit 68319646 authored by Nigel McNie's avatar Nigel McNie
Browse files

Bugfix: take the user's language into account when setting the language of...

Bugfix: take the user's language into account when setting the language of tinymce/calendar/pieforms stuff
parent 3e56da1f
...@@ -674,7 +674,7 @@ EOF; ...@@ -674,7 +674,7 @@ EOF;
// the execcommand_callback. // the execcommand_callback.
$content_css = json_encode(theme_get_url('style/tinymce.css')); $content_css = json_encode(theme_get_url('style/tinymce.css'));
$language = substr(get_config('lang'), 0, 2); $language = substr(current_language(), 0, 2);
$tinymceinit = <<<EOF $tinymceinit = <<<EOF
<script type="text/javascript"> <script type="text/javascript">
tinyMCE.init({ tinyMCE.init({
......
...@@ -998,7 +998,7 @@ function pieform_configure() { ...@@ -998,7 +998,7 @@ function pieform_configure() {
return array( return array(
'method' => 'post', 'method' => 'post',
'action' => '', 'action' => '',
'language' => get_config('lang'), 'language' => current_language(),
'autofocus' => true, 'autofocus' => true,
'renderer' => 'maharatable', 'renderer' => 'maharatable',
'elementclasses' => true, 'elementclasses' => true,
...@@ -1044,7 +1044,7 @@ function pieform_element_calendar_configure($element) { ...@@ -1044,7 +1044,7 @@ function pieform_element_calendar_configure($element) {
$element['jsroot'] = get_config('wwwroot') . 'js/jscalendar/'; $element['jsroot'] = get_config('wwwroot') . 'js/jscalendar/';
$element['themefile'] = theme_get_url('style/calendar.css'); $element['themefile'] = theme_get_url('style/calendar.css');
$element['imagefile'] = theme_get_url('images/calendar.gif'); $element['imagefile'] = theme_get_url('images/calendar.gif');
$language = substr(get_config('lang'), 0, 2); $language = substr(current_language(), 0, 2);
$element['language'] = $language; $element['language'] = $language;
return $element; return $element;
} }
......
...@@ -79,7 +79,7 @@ function &smarty($javascript = array(), $headers = array(), $pagestrings = array ...@@ -79,7 +79,7 @@ function &smarty($javascript = array(), $headers = array(), $pagestrings = array
} }
else { else {
$content_css = json_encode(theme_get_url('style/tinymce.css')); $content_css = json_encode(theme_get_url('style/tinymce.css'));
$language = substr(get_config('lang'), 0, 2); $language = substr(current_language(), 0, 2);
$headers[] = <<<EOF $headers[] = <<<EOF
<script type="text/javascript"> <script type="text/javascript">
tinyMCE.init({ tinyMCE.init({
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment