Plugins dont read general lang-file / dont use lang.inc.php
Posted: Wed Mar 28, 2007 7:57 pm
I use $serendipity['useTemplateLanguage'] = true; but this was only the base of my discovery:
I override some normal phrases in the lang-file. e.g. the text of PLUGIN_EVENT_USERPROFILES_HOBBIES.
Now I saw that in the output there is the original text and not my overriding one.
But the problem is deeper:
As I think the event-plugins do not read the normal lang-file (via lang.inc.php? anymore! Why I think so?
1) my overiding text is loaded in lang.inc.php
before all other lang-files. This works very fine in the past - even for the overriden text of plugin output:
PLUGIN_EVENT_USERPROFILES_HOBBIES
USERGALLERY_SEE_FULLSIZED
STATICPAGE_SEARCHRESULTS
...
in the past I saw my phrases, now there are the original-plugin-phrases in the output!
2) it is not only about my overriding phrases!
Look at user-profiles in the backend:
These plugin uses in the backend some text-variables, defined in the normal s9y-lang-file (which is included in lang.inc.php):
for example the first three field-names:
Realname
Username
E-Mail
in the past.
but now there is in the output:

Only the variables, defined in the plugin-lang-file are shown right (like city, ...).
the problem is still in the latest nightly and I saw it first time in s9y_200703062342.tar.gz (but it could be older)
I override some normal phrases in the lang-file. e.g. the text of PLUGIN_EVENT_USERPROFILES_HOBBIES.
Now I saw that in the output there is the original text and not my overriding one.
But the problem is deeper:
As I think the event-plugins do not read the normal lang-file (via lang.inc.php? anymore! Why I think so?
1) my overiding text is loaded in lang.inc.php
Code: Select all
// The following variable can be set in serendipity_config_local.inc.php to force your templates being able to use language override includes
if ($serendipity['useTemplateLanguage']) {
@include (S9Y_INCLUDE_PATH . 'templates/' . $serendipity['template'] . '/' . $charset . 'lang_' . $serendipity['lang'] . '.inc.php');
@include (S9Y_INCLUDE_PATH . 'templates/' . $serendipity['template'] . '/lang_en.inc.php');
}PLUGIN_EVENT_USERPROFILES_HOBBIES
USERGALLERY_SEE_FULLSIZED
STATICPAGE_SEARCHRESULTS
...
in the past I saw my phrases, now there are the original-plugin-phrases in the output!
2) it is not only about my overriding phrases!
Look at user-profiles in the backend:
These plugin uses in the backend some text-variables, defined in the normal s9y-lang-file (which is included in lang.inc.php):
for example the first three field-names:
Realname
Username
in the past.
but now there is in the output:
Code: Select all
USERCONF_REALNAME
USERCONF_USERNAME
USERCONF_EMAILOnly the variables, defined in the plugin-lang-file are shown right (like city, ...).
the problem is still in the latest nightly and I saw it first time in s9y_200703062342.tar.gz (but it could be older)