Skip to content
Lance Pollard edited this page Apr 12, 2012 · 1 revision

Internationalization (I18n)

# config/locales/en.coffee
module.exports =
  hello: "world"
  forms:
    titles:
      signup: "Signup"
  pages:
    titles:
      home: "Welcome to %{site}"
  posts:
    comments:
      none: "No comments"
      one: "1 comment"
      other: "%{count} comments"
  messages:
    past:
      none: "You never had any messages"
      one: "You had 1 message"
      other: "You had %{count} messages"
    present:
      one: "You have 1 message"
    future:
      one: "You might have 1 message"

Tower also has some more internal locale files for system generated text such as dates and times etc. You can provide your own locale files for these as well (see the Tower src code and look for /locale folders).

Tower.js

Everything here will be reflected on http://towerjs.org/guides.

Clone this wiki locally