[ckan-dev] How to activate and compile CKAN internationalization files within an extension
Stefan Oderbolz
stefan.oderbolz at liip.ch
Mon Nov 4 10:10:23 UTC 2013
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20131104/cca2f858/attachment-0001.html>
More information about the ckan-dev
mailing list