1
gediminasbyt
Function to check if language file exists

I'm trying to figure out how and where should I look for a language file if it exists. Let say if english is default then script has to look if another language is there. Something like this, but it doesn't seem to work. Where should I put it.

if ( file_exists("language/".$xoopsConfig['language']."/main.php") ) {
        include_once 
"language/".$xoopsConfig['language']."/main.php";
} else {
        include_once 
"language/english/main.php";
}


Thanks.

Gediminas

2
phppp
Re: Function to check if language file exists
  • 2005/8/26 23:26

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


try full path

Login

Who's Online

167 user(s) are online (132 user(s) are browsing Support Forums)


Members: 0


Guests: 167


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jan 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits