Jump to content

Help with 1 line of code


djddc

Recommended Posts

Hi all ,

 

I need some help with this line of code :

define('DEFAULT_DB_LANGUAGE', 'english');

Where it says 'english' is refered to the folder ROOT >> language >> english.

If say I have a folder named spanish but don't want to change the line manually each time, what could i put in the place of 'english' ?

 

include_once( $fileExtension."language/".$session->value( "site_lang" )."/global.lang.php" );

is an example of a line of code i use that automatically selects the right file based on chosen language.

 

could some one give me a hand with this ?

 

thanx guys

Link to comment
https://forums.phpfreaks.com/topic/196508-help-with-1-line-of-code/
Share on other sites

Is this what you're looking for?

 

define('DEFAULT_DB_LANGUAGE', 'english');

//Elsewhere in the code
include_once( $fileExtension."language/". DEFAULT_DB_LANGUAGE ."/global.lang.php" );

 

Another example:

define('DEFAULT_DB_LANGUAGE', 'espanol');

//Elsewhere in the code
include_once( $fileExtension."language/". DEFAULT_DB_LANGUAGE ."/global.lang.php" );

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.