Commit 30453465c14abb442310514dcac4e7f379e9fc29

Authored by nbm
1 parent 4ca6b802

Register languages in KTCoreLanguagePlugin.php, which happens early on.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5140 c91229c3-7414-0410-bfa2-8a42b809f60b
plugins/ktcore/KTCoreLanguagePlugin.php 0 → 100644
  1 +<?php
  2 +
  3 +/**
  4 + * $Id$
  5 + *
  6 + * Copyright (c) 2006 Jam Warehouse http://www.jamwarehouse.com
  7 + *
  8 + * This program is free software; you can redistribute it and/or modify
  9 + * it under the terms of the GNU General Public License as published by
  10 + * the Free Software Foundation; using version 2 of the License.
  11 + *
  12 + * This program is distributed in the hope that it will be useful,
  13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15 + * GNU General Public License for more details.
  16 + *
  17 + * You should have received a copy of the GNU General Public License
  18 + * along with this program; if not, write to the Free Software
  19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  20 + *
  21 + * -------------------------------------------------------------------------
  22 + *
  23 + * You can contact the copyright owner regarding licensing via the contact
  24 + * details that can be found on the KnowledgeTree web site:
  25 + *
  26 + * http://www.ktdms.com/
  27 + */
  28 +
  29 +require_once(KT_LIB_DIR . '/plugins/pluginregistry.inc.php');
  30 +require_once(KT_LIB_DIR . '/plugins/plugin.inc.php');
  31 +
  32 +class KTCoreLanguagePlugin extends KTPlugin {
  33 + var $bAlwaysInclude = true;
  34 + var $sNamespace = "ktcore.language.plugin";
  35 + var $iOrder = -75;
  36 +
  37 + function setup() {
  38 + $this->registeri18n('knowledgeTree', KT_DIR . '/i18n');
  39 + $this->registeri18nLang('knowledgeTree', "en", "default");
  40 + $this->registerLanguage('en', 'English (United States)');
  41 + }
  42 +}
  43 +
  44 +$oRegistry =& KTPluginRegistry::getSingleton();
  45 +$oRegistry->registerPlugin('KTCoreLanguagePlugin', 'ktcore.language.plugin', __FILE__);
plugins/ktcore/KTCorePlugin.php
@@ -32,6 +32,7 @@ require_once(KT_LIB_DIR . &#39;/plugins/plugin.inc.php&#39;); @@ -32,6 +32,7 @@ require_once(KT_LIB_DIR . &#39;/plugins/plugin.inc.php&#39;);
32 class KTCorePlugin extends KTPlugin { 32 class KTCorePlugin extends KTPlugin {
33 var $bAlwaysInclude = true; 33 var $bAlwaysInclude = true;
34 var $sNamespace = "ktcore.plugin"; 34 var $sNamespace = "ktcore.plugin";
  35 + var $iOrder = -25;
35 36
36 function setup() { 37 function setup() {
37 $this->registerAction('documentaction', 'KTDocumentDetailsAction', 'ktcore.actions.document.displaydetails', 'KTDocumentActions.php'); 38 $this->registerAction('documentaction', 'KTDocumentDetailsAction', 'ktcore.actions.document.displaydetails', 'KTDocumentActions.php');
@@ -67,8 +68,6 @@ class KTCorePlugin extends KTPlugin { @@ -67,8 +68,6 @@ class KTCorePlugin extends KTPlugin {
67 68
68 $this->registerAdminPage('authentication', 'KTAuthenticationAdminPage', 'principals', _kt('Authentication'), _('By default, KnowledgeTree controls its own users and groups and stores all information about them inside the database. In many situations, an organisation will already have a list of users and groups, and needs to use that existing information to allow access to the DMS. These <strong>Authentication Sources</strong> allow the system administrator to specify additional sources of authentication data.'), 'authentication/authenticationadminpage.inc.php'); 69 $this->registerAdminPage('authentication', 'KTAuthenticationAdminPage', 'principals', _kt('Authentication'), _('By default, KnowledgeTree controls its own users and groups and stores all information about them inside the database. In many situations, an organisation will already have a list of users and groups, and needs to use that existing information to allow access to the DMS. These <strong>Authentication Sources</strong> allow the system administrator to specify additional sources of authentication data.'), 'authentication/authenticationadminpage.inc.php');
69 70
70 - $this->registeri18n('knowledgeTree', KT_DIR . '/i18n');  
71 -  
72 $this->registerPortlet(array('browse'), 71 $this->registerPortlet(array('browse'),
73 'KTAdminModePortlet', 'ktcore.portlets.admin_mode', 72 'KTAdminModePortlet', 'ktcore.portlets.admin_mode',
74 'KTPortlets.php'); 73 'KTPortlets.php');