Home arrow Forum

Remository Forum

 


admin

Karma: 57  
Language files - 2005/08/28 20:15 Many components (also sometimes modules or mambots) have language files. This is a good principle, as it allows for text that is displayed to be kept separate from the code, so that versions in different languages are easily substituted.

There is another useful feature of language files, and that is that users can easily alter the text themselves. However, this use can create a problem when the user is faced with the task of doing the edits all over again when a new version of the software is released with a different language file.

My recommendation is that all language files avoid the simple use of define, instead first checking whether the definition is there already. So a typical line of a language file should be:

if (!defined('NAME')) define ('NAME','VALUE');

This way, the user can use simple defines in a block prior to the standard definitions. Any item that has been defined by the user will not get its standard definition. The user defines are all together and easily moved to a future version.
Martin Brampton aka Counterpoint
http://black-sheep-research.com
http://mamboguru.com
  | | Sorry, you do not currently have permission to write here.

      Topics Author Date
    thread link
Language files
admin 2005/08/28 20:15
    thread link
thread link Re:Language files
Nicolas Moyroud 2005/12/01 15:27
    thread link
thread linkthread link Re:Language files
admin 2005/12/02 03:54

Menu

Budding author?

Could you write about software?  Packt Publishing is looking for authors for its new series of Beginners' Guides.  Take a look at their web site to find out more.

Login Form

Username

Password

Remember me
Password Reminder
No account yet?
Create one

Who is Online

Remository welcomes guests and registered users.

We have 13 guest online