======Language File Customization====== //New in version 0.3// Classifieds version 0.3 introduces the ability for site administrators to customize the text that is displayed by the plugin- messages, field prompts and similar items. To override the supplied text strings, simply create a file in {plugin_dir}/classifieds/language/custom/ with the same name as the language file that you're modifying. This file only needs to define the customized strings. A bit of PHP knowledge is helpful here. Example custom 'english.php': In this example, two text strings are being overwritten. Normally, when $LANG_ADVT['submit_an_ad'] is encountered in the code or a template, the string 'Submit a Classified Ad' is inserted. By overriding this value, 'Submit an Ad' will be used instead. By placing your language customizations in the /custom directory, rather than directly modifying the main language file, your changes won't be overwritten when you upgrade the plugin. This is the same idea that's behind glFusion's custom template operation. ====Language File Selection==== The main language file is chosen by looking at the $_CONF['language'] variable, which defines the site language to be used for the current user. If a file with that name exists, it is used. If not, then 'english.php' is used by default. After deciding on the main language filename, the plugin looks for a custom language with the same name. There is no default in this case. For example, if 'spanish.php' is selected based on the site or user preference, then the plugin will look for a custom 'spanish.php' file. It will not fall back to 'english.php'. As simple as this looks, there are a few things to keep in mind: * The custom language file name must exactly match the main language file name. Otherwise, it simply won't be loaded. * The ) is optional. * The variable names must match exactly the variable being overridden. Any other variable names will be ignored. * Variables must be individually defined. Don't try to take a shortcut by defining $LANG_ADVT=array('key'=>'value', 'key'=>'value'); This will completely replace the default language definitions- probably not what you want to do.