FAIL
I can't seem to do it, have et my tin of spaghetti bolognaise (nice one Sainsbury's for stocking a vegan friendly version of this convenient lunch again, it's been a while) and have things going round in my mind. BUT trying to take a proper break so as to keep me fresh for the afternoon. If I blog about what I'm thinking about at work do you think that will keep me fresh enough? Here's what's troubling me anyway, I want a smarty plugin that is REALLY REALLY REALLY simple so it can be called like
{translate 'hello'}
I've already got the back end actually doing the translation so that's fine, and I know I can do
{translate word='hello'}
but I want something even simpler. For a while I tried a modifier instead of a function like
{'hello'|translate}
But I want something more. A modifier like that doesn't have access to the $smarty object for one thing, so I can't see (for example) if other things have been assigned on the page without a whole lot of globalising...
Maybe @theHuzz 1 has solved this 2 while I've been writing this, as I twittered it too hoping someone would:
@pauly what about a block function then you could use {translate}hello{/translate} ?
It's a bit longer, and is slightly more complex for my target audience to use but it might do the job. In fact the example here 3 is, um, a translation function.
I will carry on thinking about this after lunch.
Should have spent that time working on making my venue urls look like this as an seo experiment...
⬅️ iphone app developer up for sale on ebay :: RE: Open Mic night at the Whole World cafe this Friday - 13080 ➡️
Paulʼs blog - I live some place you've not heard of in the far South. Wed + father to two, I'm a full stack web developr, + I do js / node, some ruby, other languages ect ect. I like pubs, running, restaurants, home-automation and other diy jiggery-pokery, history, family tree stuff, television, squirrels, pirates ☠️, lego, and TIME TRAVEL.