<?php
/****************************************************************
*****************************************************************
Copyright (C) 2003 Matthieu MARY http://www.phplibrairies.com
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
You can found more information about GPL licence at:
http://www.gnu.org/licenses/gpl.html
for contact me: http://www.phplibrairies.com
****************************************************************
****************************************************************/
/**
* @shortdesc tools for making easy query on google search browser
* under GPL licence
* latest version can be download at : http://www.phplibrairies.com
*
* @author Matthieu MARY <<a href="http://www.phplibrairies.com">http://www.phplibrairies.com</a>>
* @version 1.0.0
* @date March 02th 2004
**/
class lang
{
var $aFile;
/**
* builder
* @param string lang : lang type
* @param string path : path to lang files
* @param string ext : extensions for the lang files
* @type void
* @public
**/
function lang($lang,$path='.',$ext='txt')
{
$this->aFile = @file($path.'/'.$lang.'.'.$ext);
}
/**
* write a line of the lang file
* @param int id : the lang id to write
* @type void
* @public
**/
function w($id)
{
if (in_array($id,array_keys($this->aFile))) echo trim($this->aFile[$id]);
}
/**
* return a line of the lang file
* @param int id : the lang id to return
* @type string
* @public
**/
function r($id)
{
if (in_array($id,array_keys($this->aFile))) return trim($this->aFile[$id]);
}
}
?>