]> git.mjollnir.org Git - s9y.git/commitdiff
Allow to choose between NATIVE and UTF-8 format.
authorgarvinhicking <garvinhicking>
Mon, 1 Aug 2005 18:34:14 +0000 (18:34 +0000)
committergarvinhicking <garvinhicking>
Mon, 1 Aug 2005 18:34:14 +0000 (18:34 +0000)
docs/NEWS
include/lang.inc.php
include/tpl/config_local.inc.php
serendipity_config.inc.php

index 826cd6d387236bfa3e00a4132cf2ead8d8aeedd3..753e669abe7459e38cb67dc71538714ac26c3919 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,8 @@
 Version 0.9 ()
 ------------------------------------------------------------------------
 
+    * Allow to switch charsets ("Native" / "UTF-8"). (garvinhicking)
+
     * Permissions: The permission "adminImagesViewOthers" now controls
       whether an author is allowed to view images or not. In older Serendipity
       versions, any author could always view any images, but only modify those
index 908d45463988bcb08dcb3215f10731b948dac14a..7b70946051a865f218c83070c61e859fac9de9c1 100644 (file)
@@ -4,7 +4,7 @@
 
 if (!defined('serendipity_LANG_LOADED') || serendipity_LANG_LOADED !== true) {
     // Try and include preferred language from the configurated setting
-    if (@include(S9Y_INCLUDE_PATH . 'lang/serendipity_lang_'. $serendipity['lang'] .'.inc.php') ) {
+    if (@include(S9Y_INCLUDE_PATH . 'lang/' . $serendipity['charset'] . 'serendipity_lang_'. $serendipity['lang'] .'.inc.php') ) {
         // Only here can we truely say the language is loaded
         define('serendipity_LANG_LOADED', true);
     } elseif (IS_installed === false || (defined('IS_up2date') && IS_up2date === false)) {   /* -- Auto-Guess -- */
@@ -14,7 +14,7 @@ if (!defined('serendipity_LANG_LOADED') || serendipity_LANG_LOADED !== true) {
     }  //endif
 
     // Do fallback to english
-    if ((defined('serendipity_LANG_LOADED') && serendipity_LANG_LOADED === true) || IS_installed === false || (defined('IS_up2date') && IS_up2date === false)) {
+    if (IS_installed === false || (defined('IS_up2date') && IS_up2date === false)) {
         @include_once(S9Y_INCLUDE_PATH . 'lang/serendipity_lang_en.inc.php');
     }
 }
@@ -78,4 +78,4 @@ if (!defined('serendipity_MB_LOADED') && defined('serendipity_LANG_LOADED')) {
 }
 
 /* vim: set sts=4 ts=4 expandtab : */
-?>
+?>
\ No newline at end of file
index ec8f33692fee41fafc7a7e88c00c7b0bb8107b10..02a0ba98331b6b7409bff28adb8192c7befd0879 100644 (file)
                                           'permission'  => 'siteConfiguration',
                                           'flags'       => array('simpleInstall')),
 
+                                    array('var'         => 'charset',
+                                          'title'       => INSTALL_CHARSET,
+                                          'description' => INSTALL_CHARSET_DESC,
+                                          'type'        => 'list',
+                                          'default'     => $serendipity['charsets'],
+                                          'permission'  => 'siteConfiguration'),
+
                                     array('var'         => 'calendar',
                                           'title'       => INSTALL_CAL,
                                           'description' => INSTALL_CAL_DESC,
index 4e22a8325c5322f2cae0dfb905d81971320034e9..9f6e33d2dcebb9bb6f9339dfb11f8c51ba5d4062 100644 (file)
@@ -211,6 +211,11 @@ if (defined('DATE_LOCALES')) {
     }
 }
 
+$serendipity['charsets'] = array(
+    '/UTF-8/' => 'UTF-8',
+    ''        => CHARSET_NATIVE
+);
+
 /*
  *   Fallback charset, if none is defined in the language files
  */