class I18n::PostgresJson::Backend
Public Instance Methods
available_locales()
click to toggle source
# File lib/i18n/postgres_json/backend.rb, line 10 def available_locales @available_locales || Translation.available_locales end
available_locales=(available_locales)
click to toggle source
# File lib/i18n/postgres_json/backend.rb, line 6 def available_locales=(available_locales) @available_locales = Array(available_locales).map(&:to_sym).presence end
store_translations(locale, data, **options)
click to toggle source
# File lib/i18n/postgres_json/backend.rb, line 14 def store_translations(locale, data, **options) Translation.store_translations(locale, data) end
Protected Instance Methods
lookup(locale, key, scope = [], separator: I18n.default_separator, **options)
click to toggle source
# File lib/i18n/postgres_json/backend.rb, line 20 def lookup(locale, key, scope = [], separator: I18n.default_separator, **options) Translation.locale(locale).lookup(key, scope, separator: separator) end