This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
|
class I18nLiquid < Liquid::Tag
|
|
|
|
def initialize(tag_name, value, tokens)
|
|
super
|
|
@value = value.to_s
|
|
end
|
|
|
|
def render(context)
|
|
I18nVariable.first(:conditions => {:key => @value})[I18n.locale] rescue ''
|
|
end
|
|
end
|
|
|
|
Liquid::Template.register_tag('t', I18nLiquid)
|