note 72506 deleted from function.define by didou

From: Date: Mon, 22 Jan 2007 07:38:11 +0000
Subject: note 72506 deleted from function.define by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-122028@lists.php.net to get a copy of this message
Note Submitter: NIMA [AT] YAHOO [DOT] COM Reason: bad code ---- imagine you want to allow your software users to tralsate your software for their use, you can create a separate file containing messages only using define() then all your users need to do is translating the messages in define() line. for example create a file only for language strings: define(WELCOME, "Hello world", true); define(END, "Goodbye world", true); then in template files, the language file should be included and the message can be printed using this: <?=welcome?> // it echoes "Hello World" or <?=end?> // it echoes "Goodbye world" remember you users should not necessarily know php and the "echo" command, so they can simply use <?=welcome?> or <?=end?>

« previous php.notes (#122028) next »