Class: Jekyll::AttendeasePlugin::LocalesScriptTag

Inherits:
Liquid::Tag
  • Object
show all
Defined in:
lib/jekyll/attendease_plugin/tags.rb

Instance Method Summary collapse

Instance Method Details

#render(context) ⇒ Object



38
39
40
41
42
# File 'lib/jekyll/attendease_plugin/tags.rb', line 38

def render(context)
  locale = context.registers[:site].config['attendease']['locale']
  api_host = context.registers[:site].config['attendease']['api_host']
  "<script type=\"text/javascript\">String.locale=\"#{locale}\";String.toLocaleString(\"#{api_host}api/lingo.json\");</script>"
end