2015-09-28, 06:41:04
Hi,
First of all thanks for your reply.
My "plugin" is rather simple... I thought this would be enough...:
How should I use this $language variable in my code?
First of all thanks for your reply.
My "plugin" is rather simple... I thought this would be enough...:
PHP Code:
<?php
# get correct id for plugin
$thisfile=basename(__FILE__, ".php");
# add in this plugin's language file
i18n_merge($thisfile) || i18n_merge($thisfile, 'pl_PL');
# register plugin
register_plugin(
$thisfile, # ID of plugin, should be filename minus php
i18n_r($thisfile.'/TITLE'), # Title of plugin
'1.0', # Version of plugin
'XXX', # Author of plugin
'XXX', # Author URL
i18n_r($thisfile.'/DESC'), # Plugin Description
null, # Page type of plugin
null # Function that displays content
);
function get_translation($field) {
$pluginName = 'XXX';
return i18n($pluginName . '/' . $field);
}
?>
How should I use this $language variable in my code?