[ckan-dev] How to activate and compile CKAN internationalization files within an extension
Ralf
user66 at arcor.de
Mon Nov 4 09:23:49 UTC 2013
Wonderful tip, Ian. Thank you. Using msgcat and msgfmt for replacing
the standard mo files works perfect!
Last question / problem:
How do I replace the default "en" files? There are only "en_GB" and
"en_AU" directories under "pyenv/src/ckan/ckan/i18n/". I could not
find any other mo files that would fit to plain "en". Is the "en"
translation hardcoded into the CKAN source? Or how to tweak it?
@Stefan: The "pyenv/lib/python2.7/site-packages/ckan/i18n" dir does
not exist on my site. So, you don't replace the i18n files under
"pyenv/src/ckan/ckan/i18n/"?
Cheers
Ralf
Zitat von Ian Ward <ian at excess.org>:
> On Sun, Nov 3, 2013 at 5:38 PM, Stefan Oderbolz
> <stefan.oderbolz at liip.ch> wrote:
>>>
>>> 2) Is it valid to compile the .mo files by using the "msgfmt" tool from
>>> gettext package? I used something like
>>
>>
>> Although I never tried this before, but I would be really surprised of this
>> doesn't work. "gettext" is a standard format and it shouldn't matter how you
>> compile your files.
>
> Yes, this is what we had to do as well. We're using msgcat to combine
> (and partially override) the core CKAN French translations then
> replacing the generated .mo file:
> https://github.com/open-data/ckanext-canada/blob/master/bin/build-combined-ckan-mo.sh
More information about the ckan-dev
mailing list