XPressME Integration Kit

Trac


Ignore:
Timestamp:
May 10, 2011, 3:20:19 PM (13 years ago)
Author:
toemon
Message:

wp-configのWPLANGをXOOPSのlangを元に設定する機能を追加 Fixed#401

Location:
branches/Ver3.0/xpressme_integration_kit
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/Ver3.0/xpressme_integration_kit/class/config_from_xoops.class.php

    r733 r743  
    1212 * The function to acquire only a set value without calling the XOOPS system is here. 
    1313 */ 
     14require_once dirname( __FILE__ ).'/wpInfo_class.php' ; 
     15 
    1416class ConfigFromXoops{ 
    1517        var $xoops_mainfile_path; 
     
    4951        var $xoops_db_pconnect; 
    5052        var $xoops_path; 
     53        var $xoops_lang; 
     54        var $wp_lang; 
    5155         
    5256        function __constructor()        //for PHP5 
     
    97101                if(defined('XOOPS_DB_SALT')) $this->xoops_db_salt = XOOPS_DB_SALT; else $this->xoops_db_salt = ''; 
    98102                if(defined('XOOPS_SALT')) $this->xoops_salt = XOOPS_SALT; else $this->xoops_salt = ''; 
     103                $this->xoops_lang =  @$GLOBALS["xoopsConfig"]['language']; 
     104                $wp_info = new wpInfo; 
     105                $this->wp_lang = $wp_info->get_wpLang($this->xoops_lang); 
     106 
    99107        } 
    100108         
  • branches/Ver3.0/xpressme_integration_kit/wp-config.php

    r535 r743  
    7373 * Example: 
    7474 * define ('WPLANG', '');               // language support to English 
     75 * define ('WPLANG', 'ja');             // language support to Japanese 
    7576 */ 
    76 define ('WPLANG', 'ja');                // language support to Japanese 
     77define ('WPLANG', $xoops_config->wp_lang);              // language detect from xoops language 
    7778 
    7879/* That's all, stop editing! Happy blogging. */ 
Note: See TracChangeset for help on using the changeset viewer.