Use Middleman liquid template and Localization

I was wondering if anyone has figured out a way to use the Liquid template language in Middleman, but still use Localization.

I’ve tried replacing:

<%= I18n.t(:hello) %>
with:
{{ 'hello' | t }}
or
{{ 'hello' | I18n.t }}

But can’t seem to get it working. Anyone got advice for me?

Thanks!

My understanding of Liquid is that it doesn’t allow to run any code (with exceptions), so anything except basic url/img helpers is not expected to be available. Disclaimer: I don’t use Liquid, but I’ve read articles like this: https://www.smashingmagazine.com/2015/11/static-website-generators-jekyll-middleman-roots-hugo-review/

Liquid is a safe templating engine made to run untrusted templates for Shopify’s hosted platform. That means there is no custom code in the templates. Ever. (…) On the other hand, it does mean you have to start creating your own Liquid helpers from Jekyll plugins if you want to do anything that’s not baked in.