logo

Member
Member
Offline Offline
Posts: 46
SVN 663: Internationalizing Users Online Panel

Internationalizing the Users Online panel.

Create and Open
Code:
panels/users_online/languages/en.php


Paste Contents
Code:

<?php
/* eoCMS is a content management system written in php
    Copyright (C) 2007 - 2009  James Mortemore, Ryan Matthews
    http://www.eocms.com
   This work is licensed under the Creative Commons
   Attribution-Share Alike 3.0 United States License.
   To view a copy of this license, visit
   http://creativecommons.org/licenses/by-sa/3.0/us/
   or send a letter to Creative Commons, 171 Second Street,
   Suite 300, San Francisco, California, 94105, USA.
   Additional license terms at http://eocms.com/license.html
*/
$PANEL_LANG = array();

$PANEL_LANG['uo_title']         = 'Users Online';
$PANEL_LANG['uo_guests_on']     = 'Guests Online: ';
$PANEL_LANG['uo_members_on']    = 'Members Online: ';
$PANEL_LANG['uo_total_on']      = 'Total Members: ';

?>


Next up, plugging it in.

Open
Code:
panels/users_online/index.php


Find
Code:

$body .= '<div class="panel-header">'.theme('title', 'Users Online') .'</div>'. theme('start_content_panel');


Replace With
Code:

$body .= '<div class="panel-header">'.theme('title', $PANEL_LANG['uo_title']) .'</div>'. theme('start_content_panel');


Find
Code:

$body .= 'Guests Online: '.$guests.'<br />Members Online: '.$members.'<br />Total Members: '.$total_users;


Replace With
Code:

$body .= $PANEL_LANG['uo_guests_on'].$guests.'<br />' .$PANEL_LANG['uo_members_on'].$members.'<br />'.$PANEL_LANG['uo_total_on'].$total_users;



And done.

It's internationalized, the text comes up right, and everything appears to work.
eoCMS Developer
eoCMS Developer
Offline Offline
avatar
Posts: 1528
Re: SVN 663: Internationalizing Users Online Panel

Fixed

Please do not PM me requesting support or anything, use the forums, thats what they are here for
eoCMS Designer
eoCMS Designer
Offline Offline
avatar
Posts: 1290
tbarkass_willamson@hotmail.com
Re: SVN 663: Internationalizing Users Online Panel

This bug has been deemed [Fixed] by an eoCMS developer. If you dispute the Fix, please PM a developer, giving details of why. This topic can then be unlocked allowing for further discussion.

Seen a bug? Report it!

Jump to:


0.09 seconds Queries: 14