                              typeof lastParam.onError == "function"))
       callbacks = params.pop()
 
-  subscriptionChangedDep = new Deps.Dependency;
+  # We want the onReady/onError methods to be called only once (not for every language change)
+  onReadyCalled = false;
+  onErrorCalled = false;
+  original_onReady = callbacks.onReady;
+  callbacks.onReady = ->
+    if onErrorCalled
+      return
+
+    local_session.set("ready", true)
+
+    if original_onReady?
+      original_onReady()
+
+  if callbacks.onError?
+    callbacks.onError = ->
+      if onReadyCalled
+        _.once callbacks.onError
+
   subscription = null
   subscription_computation = null
   subscribe = ->


      subscription =
        Meteor.subscribe.apply @, removeTrailingUndefs [].concat(name, params, lang_tag, callbacks)

      subscriptionChangedDep.changed()

  # If TAPi18n is called in a computation, to maintain Meteor.subscribe
  # behavior (which never gets invalidated), we don't want the computation to

  return obj

TAPi18n.subscribe = (name) ->
  local_session = new ReactiveDict
  local_session.set("ready", false)

  # parse arguments
  params = Array.prototype.slice.call(arguments, 1)
  callbacks = {}
  if params.length
    lastParam = params[params.length - 1]
    if (typeof lastParam == "function")
