            * Format number based on given pattern
            * @todo Use global function instead of filter. It's more flexible. For now it's filter
            *       just because it's faster to use and easier replacement for old filter
-           * @param {number} value               Number which should be formatted
-           * @param {string} format = '0,0[.]00' Pattern as per http://numbrojs.com/format.html
-           * @param {string} locale = locale     Locale name as per https://github.com/foretagsplatsen/numbro/tree/master/languages
+           * @param {number} value                  Number which should be formatted
+           * @param {string} format = '0,0[.]00'    Pattern as per http://numbrojs.com/format.html
+           * @param {string} locale = currentLocale Locale name as per https://github.com/foretagsplatsen/numbro/tree/master/languages
            * @return {string} Formatted number
           ###
-          env.addFilter '_n', (value, format = '0,0[.]00', locale = locale) ->
+          env.addFilter '_n', (value, format = '0,0[.]00', locale = currentLocale) ->
             numbro.language(locale)
             numbro(value).format(format)
 


          ###*
           * Pluralize string based on count
           * @param {number} count           Current count
           * @param {array}  forms           List of possible plural forms
           * @param {string} locale = locale Locale name
           * @return {string} Pluralized string
          ###
          env.addGlobal '_p', (count, locale = locale) ->
            smartPlurals.Plurals.getRule(locale)
            smartPlurals(count, forms)



          data.page = data.page || {}

          data.page.locale     = currentLocale
          data.page.url        = '/' + filepath
          data.page.breadcrumb = filepath.split('/')
          data.page.basename   = path.basename(@src[0], '.nj')
