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

Ralf user66 at arcor.de
Mon Nov 4 10:46:39 UTC 2013


Hi Stefan,

thanks for your feedback.

As workaround I will simply offer "en_GB" instead or on top of of  
plain English in the language drop down menu.

Cheers
Ralf


Zitat von Stefan Oderbolz <stefan.oderbolz at liip.ch>:

>> 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?
>>
>
> There is no such things as "en" default files. CKAN uses "en" as the
> default source language, i.e. if you don't translate anything, it's
> English. I think this was a very bad choice, as it makes customizing the
> English translation really painful. For this purpose we removed the code
> that prevents the loading of translations for "en" provide an English .mo
> file.
>
>
>
>> @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/"?
>>
>
> If you use "python setup.py install" it installs CKAN in the lib directory
> ("pyenv/lib/python2.7/site-packages/ckan/i18n" on my machine), hence the
> files in "pyenv/src/ckan/ckan/i18n" are never used, as they have been
> copied before. But if you use "python setup.py develop" you could directly
> change the files in your src directory.
>
>
> --
> Liip AG  //  Feldstrasse 133 //  CH-8004 Zurich
> Tel +41 43 500 39 80 // GnuPG 0x7B588C67 // www.liip.ch






More information about the ckan-dev mailing list