← Home

Plugin/Patch: Use Globalize from Liquid templates

Want to access Globalize translations (or any other RoR i18n solution) from within your Liquid templates?

There are two ways to do this. There’s a canonical way that uses the official Liquid api. That’s the less sexy one. Here's a tiny and unobtrusive plugin: Plugin Globalize Liquid filter

And there’s a reckless monkeypatch that even invents a new Liquid syntax element. That’s less clutterish. The code is right over here: Liquid patch for Localization syntax

You can find more explanation about these techniques here: Get Liquid templates to play nice with Globalize .