Gallery2:Design Documents:Language Manager - Gallery Codex
Personal tools

Gallery2:Design Documents:Language Manager

From Gallery Codex

The Language Manager provides a centralized interface for adding and removing languages across plugins (including the core module) in a Gallery2 installation. Benefits:

  • Plugin installation gets simpler
  • Installing, updating and removing languages across an entire Gallery2 installation takes only a few clicks
  • Ability to ship an installation package of a significantly reduced size


Currently, languages are managed separately for each plugin through the Get More Plugins interface. I propose the following changes:

Add a Languages admin subview

All available languages, regardless of how complete the translation is, are displayed in a table, similar to plugins. Each language provides certain actions to the administrator. These actions are determined by examining the versions of installed languages of all available plugins and comparing them to the repository. From the language manager's point of view, languages can be in the following states:

1. Not installed

No plugin has this language installed, we show a single action: download. It downloads the latest language packs for all available plugins, even those not installed.

2. Partially installed or outdated

At least one plugin's language version is older than the one in the repository, or at least one plugin doesn't have this language installed at all. Available actions are update and remove. Update downloads the latest language pack for plugins where it is out of date. Remove deletes this language pack from all plugins.

3. Up to date

All plugins' language pack is up to date. The only action available is remove which behaves as described in the previous paragraph.

In addition to managing languages, this subview should also host related options that are currently in other subviews:

  • Language Settings from the General subview
  • any more?


  • How much detail do we want to show to administrators? Is it important for them to know what plugins have outdated or missing languages? Keeping KISS in mind, I'd leave this information out of the UI.

Remove language preferences from the plugin download page

We only show the plugin download page when there is a choice of multiple repositories for a specific plugin. This will streamline the plugin installation process and the majority of users who only use the official repository will be able to install plugins with a single click. Downloading a plugin will automatically download all of its language packs that are installed in at least one other plugin (i.e. states 2 and 3 from the previous section).

Only show available languages to users

The translator class needs to be extended such that the language list returned for the end-user is only showing installed (available) languages. This is for the language selection drop-down list for the language block and for the user preferences view.