mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-07 03:01:33 +00:00
locale data as js asset
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
# Defines a global I18n object containing the language of the current locale
|
||||
<%- I18n.backend.send(:init_translations) unless I18n.backend.initialized? %>
|
||||
window.I18n = <%= I18n.backend.send(:translations)[I18n.locale].with_indifferent_access.to_json.html_safe %>
|
||||
|
||||
# Declares the translation function t.
|
||||
# You can use t('login') in Javascript.
|
||||
window.t = (key, options = {}) ->
|
||||
Reference in New Issue
Block a user