As far as i'm aware, the only steps required in order to create a internationalized extension is to create a i18n file like the following:
//SemanticHighcharts.i18n.php
$messages = array();
$messages['en'] = array(
'semantichighcharts-desc' => 'A SMW result format displaying data with the help of highcharts
);
and then reference this file with the global variable wgExtensionMessageFiles
//SemanticHighcharts.php
global $wgExtensionMessagesFiles, $wgExtensionCredits;
$wgExtensionCredits['semantic'][] = array(
'path' => __FILE__,
'name' => 'SemanticHighcharts',
'version' => '0.0.1',
'url' => 'https://www.mediawiki.org/wiki/Extension:SemanticHighcharts',
'descriptionmsg' => 'semantichighcharts-desc'
);
//i18n
$wgExtensionMessagesFiles['SemanticHighcharts'] = dirname(__FILE__) . '/SemanticHighcharts.i18n.php';
This should cause the descriptionmsg in wgExtensionCredits to be internationalized when displayed on Special:Version.
However this is not the case... In fact, no message key from the i18n file is being read!
How can i debug this issue? I've tried to debug callstack when doing a wfMessage() call without any great success.
Any help is appreciated. I'm running the latest version of mediawiki from git. And all extensions have been installed with composer.
//composer.json
{
"require": {
"php": ">=5.3.2",
"mediawiki/side-bar-menu": "dev-master",
"mediawiki/semantic-highcharts": "dev-master",
"mediawiki/semantic-result-formats": "dev-master"
},
"suggest": {
"ext-fileinfo": "*",
"ext-mbstring": "*",
"ext-wikidiff2": "*",
"ext-apc": "*"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/netbrain/SemanticHighcharts"
}
]
}