[ckan-dev] i18n in JS stuff
Richard Pope
richard at memespring.co.uk
Tue Dec 7 21:36:39 UTC 2010
On Tue, Dec 7, 2010 at 9:24 PM, Friedrich Lindenberg <friedrich at pudo.org> wrote:
> Hi all,
>
> I'm currently adding a few more pieces of i18n to CKAN - many of the form options and html templates are not actually internationalized on closer inspection. While this doesn't kill us with community catalogues, with Helsinki and the Netherlands its a real showstopper.
>
> Most of these are fixable, but some of them are in JS that doesn't currently go through any i18n filters (e.g. "Add a new resource" js link, "More >" links). Does anyone here have an idea as to how those can be externalized?
I think the one time I've been involved with something like this
(using php & smarty) we ended up serving a language.js file as a
php/smarty file. i.e. using the same system as the html. Would look
like:
language.js:
var WELCOME_MESSAGE = {__($welcome_message)}
main.js file:
alert(WELCOME_MESSAGE);
>
> Cheers,
>
> Friedrich
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
>
--
/*
richard at memespring.co.uk
memespring.co.uk
++44 7976730458
memespring (flickr/skype/etc)
memspr (aim)
*/
More information about the ckan-dev
mailing list