Flexible Content Management System


Language and Admin Module System Changes

Contributed by Anonymous on Sep 28, 2001 - 02:31 AM

First the reasons for the language changes.

We all know that the vision of PostNuke is shooting for a very stable core with the plugins to be built around the core. It makes little sense that every plugin has to add to one language file. Not only does this mean that you would have to redo the language file with every upgrade to PostNuke, you would also have to modify your language files.

On top of this, there is a serious performance concern with the language structure. Currently on every page view, your server has to parse a file that is anywhere from 100k to 125k looking for defines for words. This is even when there is only 2 words to be translated on a page.

What we have done (Credit to Sam, nexia, Patrick, and Greg) is modularize the language system. Now every block has a seperate translation. Every module, whether it is an admin module or an accessible plugin has it's own language file. Your server is now only parsing a small file for the core scripts, and then the seperate translations for each plugin or block that you use.

This really allows much better performance, and also standardizes the language system for plugins. There is one drawback though. All of the current translations will need to be redone. I am sorry for this, but it was a choice that I made for performance for the overall system. The nice part will be in future versions the translations will be easier to keep up with.

Here is a layout of the new system as written by Sam:

Core lang defs are in:


module lang defs are in:


or - for admin only defines:


lang defs needed for include files can be found in:


where [resource] is currently only 'blocks'. [xxx] is the iso language name. [name] is the block name. [modname] is the modulename.

The other change is to the admin module system. The admin folder no longer exsists. We are now placing all admin modules in the module folder. The structure is the same in that folder within the modules (links, case, module) it's just located in a different place.

Why are we doing this? Well, for one it was easier to make the language system modular as well. The other reason is when you think of a plugin, you should be able to drop the entire thing into one folder and be done with it. That is where we are headed. So, the file structure is this:

For a admin only module:




For a plugin that also has an admin module:




For most of you, these changes will be transparent. You will not see a difference in the admin, nor will you see a difference in the translations. These changes are being communicated for those of you that develope modules or help with the language files.

I believe that everyone will enjoy the differences with the structure the first time you notice a difference with performance of your site, or when you go to install or uninstall a module. Anyway, just wanted to communicate the changes in the structure with everyone that doesn't read our development list. If you want to actually see the structure changes, you can always just browse through out CVS.