1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-08 06:06:53 +02:00

Monstra MultiLanguage Development Init Commit

This commit is contained in:
Awilum
2016-04-10 20:42:34 +03:00
parent 5f1746d62e
commit dc8ef1c489
17 changed files with 282 additions and 68 deletions

View File

@@ -57,7 +57,8 @@ class SystemAdmin extends Backend
// Get all pages
$pages_array = array();
$pages_list = $pages->select('[slug!="error404" and parent="" and status="published"]');
$pages_list = $pages->select('[slug!="error404" and parent="" and locale="'.Site::getDefaultSiteLocale().'" and status="published"]');
foreach ($pages_list as $page) {
$pages_array[$page['slug']] = Html::toText($page['title']);
}
@@ -131,6 +132,7 @@ class SystemAdmin extends Backend
'timezone' => Request::post('system_timezone'),
'system_email' => Request::post('system_email'),
'language' => Request::post('system_language'),
'site_language' => Request::post('site_language'),
'maintenance_message' => Request::post('site_maintenance_message')));
Notification::set('success', __('Your changes have been saved.', 'system'));

View File

@@ -34,4 +34,4 @@ if (Session::exists('user_role') && in_array(Session::get('user_role'), array('a
}
Plugin::Admin('system', 'box');
Plugin::Admin('system', 'box');

View File

@@ -80,12 +80,20 @@
<div class="form-group">
<?php
echo (
Form::label('system_language', __('Language', 'system')).
Form::label('system_language', __('Common Language', 'system')).
Form::select('system_language', $languages_array, Option::get('language'), array('class' => 'form-control'))
);
?>
</div>
<div class="form-group">
<?php
echo (
Form::label('site_language', __('Site Language', 'system')).
Form::select('site_language', $languages_array, Option::get('site_language'), array('class' => 'form-control'))
);
?>
</div>
<div class="form-group">
<?php
echo (
Form::label('system_email', __('Email', 'system')).