diff --git a/action.php b/action.php index 637a075c..895dfa12 100644 --- a/action.php +++ b/action.php @@ -186,6 +186,8 @@ $configurationManager->put('synchronisationEnableCache',$_['synchronisationEnableCache']); $configurationManager->put('synchronisationForceFeed',$_['synchronisationForceFeed']); $configurationManager->put('feedMaxEvents',$_['feedMaxEvents']); + $configurationManager->put('language',$_['ChgLanguage']); + $configurationManager->put('theme',$_['ChgTheme']); $userManager->change(array('login'=>$_['login']),array('id'=>$myUser->getId())); if(trim($_['password'])!='') { diff --git a/locale/en.json b/locale/en.json index cd0450fd..d769bdb4 100644 --- a/locale/en.json +++ b/locale/en.json @@ -187,6 +187,7 @@ "SYNCHRONISATION_TYPE":"Synchronization type", "SYNCHRONIZE_COFFEE_TIME":"NB : The synchronization can take time, leave your browser do the job and go grab a coffee :).", "SYNCHRONIZE_NOW":"Synchronize now", + "THEMES":"Template", "TITLE":"Title", "TRASH_EVENTS":"Empty events", "UNFAVORIZE":"Unfavorize", diff --git a/locale/es.json b/locale/es.json index 64ac4ef1..0eccb4d7 100644 --- a/locale/es.json +++ b/locale/es.json @@ -187,6 +187,7 @@ "SYNCHRONISATION_TYPE":"Tipo de syncronisación", "SYNCHRONIZE_COFFEE_TIME":"NB : La syncronisación puede tomar cierto tiempo, deje su navegador y vaya tomarse un cafe. :)", "SYNCHRONIZE_NOW":"Syncronisar ahora", + "THEMES":"Tema", "TITLE":"Título", "TRASH_EVENTS":"Vaciar los eventos", "UNFAVORIZE":"Marcar no favorito", diff --git a/locale/fr.json b/locale/fr.json index 155a76b7..a869381e 100644 --- a/locale/fr.json +++ b/locale/fr.json @@ -187,6 +187,7 @@ "SYNCHRONISATION_TYPE":"Type de synchronisation", "SYNCHRONIZE_COFFEE_TIME":"NB : La synchronisation peut prendre un certain temps, laissez votre navigateur tourner et allez vous prendre un café. :)", "SYNCHRONIZE_NOW":"Synchroniser maintenant", + "THEMES":"Thème", "TITLE":"Titre", "TRASH_EVENTS":"Vider les événements", "UNFAVORIZE":"Défavoriser", diff --git a/settings.php b/settings.php index 239d8611..08811aea 100644 --- a/settings.php +++ b/settings.php @@ -8,8 +8,24 @@ require_once('header.php'); - - +// gestion de la langue +$languageList = $i18n->languages; +$tpl->assign('languageList',$languageList); +$tpl->assign('currentLanguage',$configurationManager->get('language')); + +// gestion des thèmes +$themesDir = 'templates/'; +$dirs = scandir($themesDir); +foreach($dirs as $dir){ + if(is_dir($themesDir.$dir) && !in_array($dir,array(".","..")) ){ + $themeList[]=$dir; + } +} +sort($themeList); +$tpl->assign('themeList',$themeList); +$tpl->assign('currentTheme',$configurationManager->get('theme')); + +//autres variables de configuration $tpl->assign('feeds',$feedManager->populate('name')); $tpl->assign('folders',$folderManager->populate('name')); $tpl->assign('synchronisationType',$configurationManager->get('synchronisationType')); diff --git a/templates/marigolds/settings.html b/templates/marigolds/settings.html index 22d95bf0..7ad193ab 100644 --- a/templates/marigolds/settings.html +++ b/templates/marigolds/settings.html @@ -146,6 +146,26 @@

{function="_t('PREFERENCES')"} :

{function="_t('GENERALITY')"}

{function="_t('LET_SLASH_AT_END')"}

+

{function="_t('INSTALL_LANGUAGE')"} : +

+

{function="_t('THEMES')"} : +