[ckan-dev] How to activate and compile CKAN internationalization files within an extension
John Glover
john.glover at okfn.org
Mon Nov 4 09:10:42 UTC 2013
Hi,
1) How to I initialize my customized translations to be used instead of
>> the standard ones?
>>
>
> 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.
Cheers,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20131104/fefd68d1/attachment-0001.html>
More information about the ckan-dev
mailing list