[ckan-dev] Can extensions provide their own *.po files?

Vitor Baptista vitor at vitorbaptista.com
Fri May 30 12:14:05 UTC 2014


Hi David,

There's no oficially supported way of doing it yet. The best workaround I
could find so far is to have your .po files in your extension, and using
msgcat to merge them with the core translations. Check
https://github.com/okfn/ckanext-mx for an example of how this can be done.

Cheers,


2014-05-29 15:48 GMT-03:00 David Megginson <david.megginson at megginson.com>:

> If I create a custom theme for CKAN that includes text not in the original
> CKAN templates, is there a way to translate it without having to edit core
> (essentially, to fork CKAN) by directly editing the files in ckan/i18n/?
>
> For example, let's say that my custom template lists the followers for
> each dataset.  I can include something like this in the Jinja2 template:
>
> <h3>{{ _('People following this dataset') }}</h3>
>
> Now, how do I translate that to "Ceux qui suivent ce jeu de données" or
> "Personen, die diese Datenmenge folgen"? Is there any way that theming
> extensions can provide their own *.po files?
>
>
> Thanks, David
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>


-- 

Vítor Baptista

Developer  |  http://vitorbaptista.com | LinkedIn
<http://www.linkedin.com/in/vitorbaptista> | @vitorbaptista
<http://twitter.com/vitorbaptista>

The Open Knowledge Foundation <http://okfn.org>

*Empowering through Open Knowledge*

http://okfn.org/  |  @okfn <http://twitter.com/okfn>  |  OKF on Facebook
<https://www.facebook.com/OKFNetwork>  |  Blog <http://blog.okfn.org/>  |
Newsletter <http://okfn.org/about/newsletter/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140530/7fed4b45/attachment-0003.html>


More information about the ckan-dev mailing list