magento-hackathon / Responsive-Email-Templates-with-CSS-Inliner

Idea from Kalen Jordan. We can take http://zurb.com/ink/ as a base.
https://github.com/orgs/magento-hackathon
31 stars 10 forks source link

Translation #3

Open kalenjordan opened 10 years ago

kalenjordan commented 10 years ago

@avstudnitz you mentioned wanting to handle translation. Can you explain what you had in mind? I didn't really understand the requirements that well.

You basically want the equivalent of $this->__('Content here') for all of the content in templates?

I know that @paales was also interested in this.

avstudnitz commented 10 years ago

Yes, exactly that. I'll have a look at that.

kalenjordan commented 10 years ago

Seems like the best way to handle this is just to use a {{block ...}} from within the database template to reference a phtml? That way you can handle translation easily?

LeeSaferite commented 10 years ago

While I wasn't able to participate in the hackathon as much as I wanted to, due to travelling, I did upload the base of my project and I think it may interest you.

It's an extension to the template filter system that makes adding new directives simple and conflict free (mostly).

One of the directives I added was a 'translate' directive which is probably exactly what you are looking for

https://github.com/magento-hackathon/Replace-Extend-the-core-template-filter-system-to-allow-pluggable-directives-via-config-XML

LeeSaferite commented 10 years ago

Here's a direct link to the directive itself

https://github.com/magento-hackathon/Replace-Extend-the-core-template-filter-system-to-allow-pluggable-directives-via-config-XML/blob/master/app/code/local/Aoe/ExtendedFilter/Model/Directive/Translate.php

avstudnitz commented 10 years ago

Hah, great! I will try it. Thanks for your contribution!