Changeset 587
- Timestamp:
- 06/04/08 20:53:56 (4 months ago)
- Location:
- trunk/app
- Files:
-
- 10 added
- 7 modified
-
app_controller.php (modified) (3 diffs)
-
locale/eng/LC_MESSAGES/default.po (modified) (1 diff)
-
locale/fre (added)
-
locale/fre/LC_MESSAGES (added)
-
locale/myn (added)
-
locale/myn/LC_MESSAGES (added)
-
locale/nah (added)
-
locale/nah/LC_MESSAGES (added)
-
locale/por (added)
-
locale/por/LC_MESSAGES (added)
-
locale/spa/LC_MESSAGES (added)
-
locale/spa/LC_MESSAGES/default.po (added)
-
views/elements/login_hide.ctp (modified) (1 diff)
-
views/elements/menu_b.ctp (modified) (1 diff)
-
views/layouts/portal.ctp (modified) (2 diffs)
-
views/news/display.ctp (modified) (1 diff)
-
views/news/view.ctp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/app_controller.php
r541 r587 9 9 */ 10 10 //file: app_controller.php 11 12 uses('L10n'); 11 13 12 14 class AppController extends Controller { … … 25 27 $this->Auth->authorize = 'controller'; 26 28 $this->Auth->deny('*'); 29 30 //set locale 31 $this->__setLocale(); 27 32 } 28 33 … … 48 53 exit; 49 54 } 55 56 private function __setLocale() 57 { 58 $this->L10n = new L10n(); 59 /* $languages = array('es','en'); // 'nah' for nahuatl 60 $paramLang = strtok($_SERVER['HTTP_HOST'],'.'); 61 $lang = $this->Session->check('lang') ? $this->Session->read('lang'):'en'; 62 63 if (isset($paramLang) && in_array($paramLang,$languages) ): 64 $lang = $paramLang; 65 $this->Session->write('lang',$lang); 66 else: 67 $this->Session->write('lang',$lang); 68 endif; */ 69 $lang = 'es'; 70 $this->L10n->get($lang); 71 Configure::write('Config.language', $lang); 72 } 50 73 } 51 74 ?> -
trunk/app/locale/eng/LC_MESSAGES/default.po
r361 r587 1 msgid "news_campus" 2 msgstr "News in Campus" 3 4 msgid "about_college" 5 msgstr "About College" 6 7 msgid "Join us" 8 msgstr "Join us" 9 10 msgid "logged_in" 11 msgstr "Logged in" 12 13 msgid "cPanel" 14 msgstr "Control Panel" 15 1 16 msgid "close_window" 2 3 17 msgstr "Close" 4 18 5 19 msgid "where_pin" 6 7 20 msgstr "Where is my PIN?" -
trunk/app/views/elements/login_hide.ctp
r574 r587 30 30 echo '</fieldset>'; 31 31 32 echo $html->div(null, $html->link( 'Join us!', '/users/register', array('style'=>'font-size:7pt')));33 echo $html->div(null, $html->link( 'forgot your password?', '/recovers/recover', array('style'=>'font-size:7pt')));32 echo $html->div(null, $html->link(__('Join us!', true), '/users/register', array('style'=>'font-size:7pt'))); 33 echo $html->div(null, $html->link(__('Forgot your password?', true), '/recovers/recover', array('style'=>'font-size:7pt'))); 34 34 ?> 35 35 </div> -
trunk/app/views/elements/menu_b.ctp
r431 r587 5 5 <li><?php echo $html->link('Edublogs', '/users/bloggers/', array('title'=>'eduBlogs')); ?> </li> 6 6 <li><?php echo $html->link('Podcasts', '/podcasts/recent', array('title'=>'Download and hear')); ?> </li> 7 <li><?php echo $html->link( 'Directory', '/users/directory/', array('title'=>'Staff')); ?> </li>8 <li><?php echo $html->link( 'Newsletter', '/newsletters/display/', array('title'=>'Keep in touch')); ?> </li>7 <li><?php echo $html->link(__('Directory', true), '/users/directory/', array('title'=>'Staff')); ?> </li> 8 <li><?php echo $html->link(__('Newsletter', true), '/newsletters/display/', array('title'=>'Keep in touch')); ?> </li> 9 9 <?php 10 10 //echo $html->link('Library', '/medias/display/', array('title'=>'Resources')); -
trunk/app/views/layouts/portal.ctp
r556 r587 26 26 <?php 27 27 if ( $session->check('Auth.User') ): 28 echo '<span style="font-size:7pt;color:#8bb126;padding-right:15px"> You are logged in as<b>';28 echo '<span style="font-size:7pt;color:#8bb126;padding-right:15px">'.__('logged_in', true).' <b>'; 29 29 30 echo $session->read('Auth.User.username') .'</b></span>'.$html->link( '(Logout)', '/users/logout') . ' | ';30 echo $session->read('Auth.User.username') .'</b></span>'.$html->link(__('logout', true), '/users/logout') . ' | '; 31 31 32 32 if ( $session->read('Auth.User.group_id') < 3 ): // the logged user is teacher or admin? 33 echo $html->link( 'Admin', '/admin/entries/start') . ' | ';33 echo $html->link(__("cPanel", true), '/admin/entries/start') . ' | '; 34 34 endif; 35 35 36 36 if ( $session->read('Auth.User.group_id') == 3 ): // the logged user is student 37 echo $html->link( 'My profile', '/users/edit'). ' | '.$html->link(37 echo $html->link(__('my_profile', true), '/users/edit'). ' | '.$html->link( 38 38 $html->image('static/mailgray.png', 39 39 array('alt'=>'Messages', 'title'=>'Messages')), … … 43 43 44 44 else: 45 echo $html->link( 'Login', '#', array("id"=>"logindiv", "onclick"=>"javascript:mod('logindiv', 1, '')")) . ' | ';45 echo $html->link(__('Login', true), '#', array("id"=>"logindiv", "onclick"=>"javascript:mod('logindiv', 1, '')")) . ' | '; 46 46 endif; 47 47 48 echo $html->link( 'Home', '/') . ' | ';49 echo $html->link( 'About College', '/colleges/view') . ' | ';50 echo $html->link( 'Contact', '/messages/contact') . ' | ';48 echo $html->link(__('Home', true), '/') . ' | '; 49 echo $html->link(__('about_college', true), '/colleges/view') . ' | '; 50 echo $html->link(__('Contact', true), '/messages/contact') . ' | '; 51 51 ?> 52 52 </div> -
trunk/app/views/news/display.ctp
r499 r587 2 2 // die(debug($_SERVER)); 3 3 4 echo $html->div('title_portal', 'News in campus');4 echo $html->div('title_portal', __("news_campus", true)); 5 5 6 6 foreach ($data as $val) -
trunk/app/views/news/view.ctp
r541 r587 3 3 echo $html->div('titnew', $data['News']['title']); 4 4 5 echo $html->div('redaccion', 'From <i>'.$data['Theme']['theme'].' dept</i>, posted by '.$html->link($data['User']['username'], '/users/blogger/'.$data['User']['username']).' on '. $data['News']['created']);5 echo $html->div('redaccion', __('from_dep', true).'<i> '.$data['Theme']['theme'].'</i>, posted by '.$html->link($data['User']['username'], '/users/blogger/'.$data['User']['username']).' on '. $data['News']['created']); 6 6 ?> 7 7
