[development] po import in install time

Gabor Hojtsy gabor at hojtsy.hu
Mon Aug 28 18:44:32 UTC 2006


On Mon, 28 Aug 2006, Gabor Hojtsy wrote:

> I'd better focus on the more important issue first then: importing of PO 
> files automatically on module enable (and possibly install time).

A possible solution I come up with which does not involve any change in 
Drupal core:

  - I need to create a custom install profile (locale is not enabled
    by default anyway)

  - I need to create a custom module, and let this module get installed
    as the last one. This module would import .po files in it's _install()
    hook. This module would also alter the module enable/disable form
    to point it's action='' to a custom URL handler. That handler would
    do everything which is done by the module enabler/disabler, but
    would also import the po files along the way. So this module should
    also have a high weight (to alter the form at latest time possible).

Well, this might not be the most ideal solution, but we could easily 
bundle such a profile with Drupal core translations. If we have the same 
module name in all translations, adding another translation to the profile 
would work nicely.

Gabor


More information about the development mailing list