Hi!
you mean the general s9y-lang-files, or? Because: the plugins are still able to see what lang is to load, or? If not: In the plugins are predefined lang-files, these are loaded as in the past, or?
I mean the first language file that is loaded, yes.
Plugin can still detect the language they are running in because the new variable that determines the variable is NOT fetched from the users configuration, but instead from a Cookie-Variable that will be set upon login.
What is the fix? Do you gave the plugin there own variables for realname etc? This would not sound so good, because variables identical in content should declared only once and at one point - I think.
I just moved the place around where the constants get transformed. The first time a constant is used, it will be translated. So I just had to ensure that the plugin uses those constants only after the global s9y language files are loaded.
BUT: If one wants to change phrases of a plugin, this is NO WAY for this!
Well, you can edit the plugin's language files. S9y tries to be flexible, but there is a limit between flexibility and functionality.
e.g. for the output of a static-page-search-result I can copy the plugin_staticpage_searchresults.tpl to my template-folder and add new variables, but this is not good: If the plugin-author makes some changes (new output things in the search-result?) a) I have to notice it ans b) I have to adapt it to my copy of the tpl. This is annoying.
Yes, but that's the price you have to pay for customization.
but more important: If I want to change one of the fields in the userprofiles-plugin (from Hobbies to "Tätigkeiten in der Gemeinde"). This change has to apply to the frontend output and to the backend as well. There is no tpl which I can copy and modify with new variables - and I think there are many plugins without tpls!
The way for this problem would be to enhance plugins to support tpls, or to offer options configuring the variable names.
I do see that need, but I see no way to make that happen.
The plugin framework now needs to be loaded BEFORE the user preferences are loaded, because we will need plugins to do things like user authentication. And that can only happen if the plugins run first in queue. But if a plugin runs first, it can no longer ensure that the loaded constants might be overriden by things that only get apparent once the user system has been initialized.
In my eyes s9y lost a great moment of flexibility if there is no option to override standard phrases (no difference between s9y-core and plugins)!
Actually in my eyes s9y has gained a lot of flexibility because now plugins can extend functionality much sooner in the s9y flow.
Caching can be improved, foreign user authentication, user redirection etc.
All that only for the loss of somebody simply editing a *.php file. I think the reward of the new thing is MUCH higher than the reward of the old thing.
Let's rephrase it: Just because you own an oil drilling rig, you can't expect people to drive fuel-filled cars forever.
Plus, the decreased language flexibility only gets to show of in very specific plugins, and not generally. In many cases you will still be able to override language settings in your personal language file.
Best regards,
Garvin