Changes between Version 13 and Version 14 of DolLang


Ignore:
Timestamp:
Jul 21, 2014, 2:16:55 PM (10 years ago)
Author:
Igor_L
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DolLang

    v13 v14  
    22 
    33'''[http://www.boonex.com/trac/dolphin/wiki/DolLang#Newlanguagecreation New language creation]''' 
     4 
     5'''[http://www.boonex.com/trac/dolphin/wiki/DolLang#Newlanguagecreation Translating splash block]''' 
    46 
    57== New language creation == 
     
    14161. Install the latest Dolphin 
    1517 
    16 2. Uninstall all available modules from Dolphin Admin Panel -> Tools -> Modules 
     182. Uninstall all available modules from Dolphin ''Admin Panel -> Tools -> Modules'' 
    1719 
    18203. Go to the Dolphin administration panel -> Settings -> Languages Settings. In the 'Language Files' block you need to export the necessary language file by clicking the 'Export' link. 
     
    118120 
    1191212. The steps 4-6 of the previous [http://www.boonex.com/trac/dolphin/wiki/DolLang#TranslatingnewlyinstalledDolphinsites Translating newly installed Dolphin sites] instructions should be repeated right in the way they were written above. 
     122 
     123== Translating splash block == 
     124 
     125'''''This manual is for Dolphin 7.1.x'''''.[[BR]] 
     126 
     127To translate the splash block, you'll need to make some code changes. These changes will affect only your current template while the base template will remain intact. 
     128 
     1291. So, navigate to ''Admin Panel -> Settings -> Basic Settings -> Splash''. 
     130 
     1312. Edit the HTML code so the text you wish to translate would have underscores before it (to make sure you won't translate anything you don't want to). For example: `_Join`, `_Login`, `_Welcome to the community!` 
     132 
     1333. Open the file '''templates/base/scripts/BxBaseFunctions.php''' and copy the signature and body of the function '''genSiteSplash''': 
     134 
     135{{{ 
     136    function genSiteSplash() 
     137    { 
     138        $sVisibility = getParam('splash_visibility'); 
     139        $bLogged = getParam('splash_logged') == 'on'; 
     140 
     141        if($sVisibility == BX_DOL_SPLASH_VIS_DISABLE || ($sVisibility == BX_DOL_SPLASH_VIS_INDEX && !defined('BX_INDEX_PAGE')) || ($bLogged && isLogged())) 
     142            return ''; 
     143 
     144        return DesignBoxContent('', getParam('splash_code'), 3); 
     145    } 
     146}}} 
     147 
     148Open the file '''templates/YOUR_TMPL_NAME/scripts/BxTemplFunctions.php''' (where '''YOUR_TMPL_FOLDER''' is the folder of your current template, for example '''tmpl_alt'''). 
     149 
     150Paste the copied code after: 
     151{{{ 
     152    function BxTemplFunctions() 
     153    { 
     154        parent::BxBaseFunctions(); 
     155    } 
     156}}} 
     157 
     158Modify the pasted code this way: 
     159{{{ 
     160    function genSiteSplash() 
     161    { 
     162        $sVisibility = getParam('splash_visibility'); 
     163        $bLogged = getParam('splash_logged') == 'on'; 
     164 
     165        if($sVisibility == BX_DOL_SPLASH_VIS_DISABLE || ($sVisibility == BX_DOL_SPLASH_VIS_INDEX && !defined('BX_INDEX_PAGE')) || ($bLogged && isLogged())) 
     166            return ''; 
     167 
     168        $result = str_replace('_Join', _t('_Join'), getParam('splash_code')); 
     169        $result = str_replace('_Login', _t('_Login'), $result); 
     170        $result = str_replace('_Welcome to the community!', _t('_Welcome to the community!'), $result); 
     171        return DesignBoxContent('', $result, 3); 
     172    }     
     173}}} 
     174 
     175Save the file. 
     176 
     1774. Now you only need to make sure that the language keys `_Join`, `_Login` and `_Welcome to the community!` exist in the database. Navigate to ''Admin Panel -> Settings -> Language Settings'' -> enter the name of the key in the field '''Filter''', click '''Apply'''. If the key doesn't exist, create it clicking '''Add Key'''. 
     178 
     179The keys `_Join` and `_Login` are already present in the database. The key `_Welcome to the community!` should be created.  
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.
Fork me on GitHub