/[web]/nav/lib.php
ViewVC logotype

Diff of /nav/lib.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1096 by rda, Tue May 15 17:27:45 2012 UTC revision 1154 by rda, Tue May 22 20:38:15 2012 UTC
# Line 54  class l10n Line 54  class l10n
54  */  */
55  function _mgnav_html($wrap = false, $lang = 'en', $inject = null, $vhost = '//www.mageia.org')  function _mgnav_html($wrap = false, $lang = 'en', $inject = null, $vhost = '//www.mageia.org')
56  {  {
57        $lang = _lang_simple($lang);
58    
59      l10n::load($lang);      l10n::load($lang);
60    
61      $tn = array(      $tn = array(
# Line 102  function _mgnav_style() Line 104  function _mgnav_style()
104  {  {
105      return '<style>' . file_get_contents(__DIR__ . '/css/source.css') . '</style>';      return '<style>' . file_get_contents(__DIR__ . '/css/source.css') . '</style>';
106  }  }
107    
108    /**
109     * Get the primary language subtag only.<p></p>
110    */
111    function _lang_simple($s = null)
112    {
113        if (!is_null($s)) {
114            $s = explode('-', $s);
115            $s = strtolower($s[0]);
116        }
117        return $s;
118    }

Legend:
Removed from v.1096  
changed lines
  Added in v.1154

  ViewVC Help
Powered by ViewVC 1.1.30