Sha256: 7d053cc928c3f3f7126f850f868e8f111a8402d710f30f0aa26af77749275d61

Contents?: true

Size: 539 Bytes

Versions: 1

Compression:

Stored size: 539 Bytes

Contents

#= require alchemy/alchemy.translations

window.Alchemy = {} if typeof(window.Alchemy) is 'undefined'

Alchemy.I18n =

  # Translates given string
  #
  translate: (id) ->
    if !Alchemy.locale?
      throw 'Alchemy.locale is not set! Please set Alchemy.locale to a locale string in order to translate something.'
    translation = Alchemy.translations[id]
    if (translation)
      translation[Alchemy.locale]
    else
      id

# Global utility method for translating a given string
#
Alchemy._t = (id) ->
  Alchemy.I18n.translate(id)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
alchemy_cms-3.0.0.rc5 app/assets/javascripts/alchemy/alchemy.i18n.js.coffee