[ckan-dev] How to activate and compile CKAN internationalization files within an extension

John Glover john.glover at okfn.org
Wed Nov 6 09:15:02 UTC 2013


Hi,

On 4 November 2013 14:24, Ian Ward <ian at excess.org> wrote:

> On Mon, Nov 4, 2013 at 4:10 AM, John Glover <john.glover at okfn.org> wrote:
> >> In my setup I just copy the compiles files in the CKAN directory
> >> (pyenv/lib/python2.7/site-packages/ckan/i18n). Afaik there is no way to
> >> include them from your extension directly (unlike e.g. templates).
> >
> >
> > Actually this should be possible. You cannot currently have translations
> in
> > multiple locations (so you cannot just override a few core translations
> like
> > you can do with the templates). You can however create an i18n directory
> in
> > your extension, then give the path to it using the ckan.i18n_directory
> > config option, and CKAN will load all translations from this directory.
> >
> > We do this in the EU Open Data Portal extension which is based on CKAN
> > 1.8.x, but as far as I know this should still work in 2.x.
>
> We should be doing that instead of replacing the one in the CKAN directory.
>
> Handling this cleanly in CKAN would certainly be nicer. How about a
> new plugin type to register translations and then let CKAN merge them
> with msgcat+msgfmt on startup?
>

Just to update the list: we discussed this yesterday, Ian is going to add a
card to the roadmap for this (if there isn't one already). The plan is to
do this using a new paster command instead of automatically at startup.

Cheers,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20131106/3823eaf9/attachment-0001.html>


More information about the ckan-dev mailing list