[pLog-svn] r1615 - in plog/trunk: . class/locale templates/wizard

ork at devel.plogworld.net ork at devel.plogworld.net
Sat Mar 26 22:36:00 GMT 2005


Author: ork
Date: 2005-03-26 22:36:00 +0000 (Sat, 26 Mar 2005)
New Revision: 1615

Modified:
   plog/trunk/class/locale/locales.class.php
   plog/trunk/templates/wizard/step4.template
   plog/trunk/wizard.php
Log:
set default locale for plog to en_UK.

there were some code in the template that looked like some blogLocale
should be preset. but this code wasn't working so i replaced it with the
default locale. if this was a bug and not part of some refactoring, we
should take another look at this.



Modified: plog/trunk/class/locale/locales.class.php
===================================================================
--- plog/trunk/class/locale/locales.class.php	2005-03-26 22:20:16 UTC (rev 1614)
+++ plog/trunk/class/locale/locales.class.php	2005-03-26 22:36:00 UTC (rev 1615)
@@ -5,6 +5,8 @@
 	include_once( PLOG_CLASS_PATH."class/locale/locale.class.php" );
 	include_once( PLOG_CLASS_PATH."class/locale/pluginlocale.class.php" );
 
+    define("DEFAULT_LOCALE", "en_UK");
+
 	/**
 	 * \ingroup Locale
 	 *
@@ -138,6 +140,17 @@
         }
 
         /**
+         * Returns default locale code
+         *
+         * @return default locale code
+         */
+
+        function getDefaultLocale()
+        {
+            return DEFAULT_LOCALE;
+        }
+
+        /**
          * Returns true if the given locale code is a valid one (i.e. if it is amongst
          * the available ones
          *
@@ -271,4 +284,4 @@
             return true;
         }
     }
-?>
\ No newline at end of file
+?>

Modified: plog/trunk/templates/wizard/step4.template
===================================================================
--- plog/trunk/templates/wizard/step4.template	2005-03-26 22:20:16 UTC (rev 1614)
+++ plog/trunk/templates/wizard/step4.template	2005-03-26 22:36:00 UTC (rev 1615)
@@ -28,7 +28,7 @@
    <div class="fieldHelp">Select the default language that will be used throughout your site</div>
    <select name="blogLocale" id="blogLocale">
     {foreach from=$siteLocales item=locale}
-      <option value="{$locale->getLocaleCode()}" {if $blogLocale==$locale->getLocaleCode()}selected="selected"{/if}>{$locale->getDescription()}</option>
+      <option value="{$locale->getLocaleCode()}" {if $defaultLocale==$locale->getLocaleCode()}selected="selected"{/if}>{$locale->getDescription()}</option>
     {/foreach}
    </select>
   </div>

Modified: plog/trunk/wizard.php
===================================================================
--- plog/trunk/wizard.php	2005-03-26 22:20:16 UTC (rev 1614)
+++ plog/trunk/wizard.php	2005-03-26 22:36:00 UTC (rev 1615)
@@ -1150,6 +1150,7 @@
             $this->_view = new Wizardview( "step4" );
             $this->_view->setValue( "ownerid", $userId );
             $this->_view->setValue( "siteLocales", Locales::getLocales());
+            $this->_view->setValue( "defaultLocale", Locales::getDefaultLocale());
             $ts = new TemplateSets();
             $this->_view->setValue( "siteTemplates", $ts->getGlobalTemplateSets());
             $this->setCommonData();




More information about the pLog-svn mailing list