 
           @gettext.addTextdomain(domain, messages)
 
+    resolveDomain: (domain) ->
+      if domain.charAt(0) == ':' then @gettext.textdomain() + domain else domain
+
+    textdomain: (domain) ->
+      @gettext.textdomain(@resolveDomain(domain))
+
     installNunjucksGlobals: (env, currentLocale) ->
-      gettext = @gettext
+
+      @textdomain(currentLocale)
 
       # --------------
       # i18n functions

       * @param {string} string                 String, which should be loaded
       * @return {string} Translated string into specified locale
      ###
      env.addGlobal 'dgettext', (domain = currentLocale, string) ->
        domain = if domain.charAt(0) == ':' then currentLocale + domain else domain
        gettext.dgettext(domain, string)

      ###*
      * Load plural string from current locale

       * @param {number} count                  Count for detecting correct plural form
       * @return {string} Pluralized and translated into specified loca stringle
      ###
      env.addGlobal 'dngettext', (domain, string, pluralString, count) =>
        @gettext.dngettext(@resolveDomain(domain), string, pluralString, count)

      ###*
      * Load string of specific context from current locale
