shunter icon indicating copy to clipboard operation
shunter copied to clipboard

Make internationalisation possible

Open hollsk opened this issue 7 years ago • 5 comments

This came up in today's meeting - it would be useful to be able to use i18n for front end templates. General consensus is that it should be eminently possible 🎉

@zanonnicola suggested this: https://formatjs.io/ - he's had good results with it in React, and it also supports Dust! Might be good to experiment with if anybody wants to volunteer

hollsk avatar Aug 17 '17 14:08 hollsk

We're using i18n-js successfully with Shunter in a project and just needed to create a simple Dust helper to make it work.

nsollecito avatar Aug 17 '17 15:08 nsollecito

@hollsk can this be closed do you think? Thanks.

jpw avatar Sep 03 '18 16:09 jpw

@nsollecito I don't think you committed that helper to Shunter itself, did you?

hollsk avatar Sep 03 '18 17:09 hollsk

Nope, but it might be nice to see an example of the dust helper bats eyelashes 😁

jpw avatar Sep 04 '18 09:09 jpw

@hollsk @jpw we implemented a helper with i18next that you can see here: https://github.com/ukparliament/augustus/blob/master/dust/t.js

mattrayner avatar Oct 05 '18 13:10 mattrayner