MOON
Server: Apache
System: Linux nserver.cafsindia.com 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: cafsindia (1002)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: /home/cafsindia/snap.cafsinfotech.in/node_modules/@cattr/ui-kit/node_modules/vue-i18n/src/extend.js
/* @flow */

export default function extend (Vue: any): void {
  // $FlowFixMe
  Object.defineProperty(Vue.prototype, '$t', {
    get () {
      return (key: Path, ...values: any): TranslateResult => {
        const i18n = this.$i18n
        return i18n._t(key, i18n.locale, i18n._getMessages(), this, ...values)
      }
    }
  })
  // $FlowFixMe
  Object.defineProperty(Vue.prototype, '$tc', {
    get () {
      return (key: Path, choice?: number, ...values: any): TranslateResult => {
        const i18n = this.$i18n
        return i18n._tc(key, i18n.locale, i18n._getMessages(), this, choice, ...values)
      }
    }
  })
  // $FlowFixMe
  Object.defineProperty(Vue.prototype, '$te', {
    get () {
      return (key: Path, locale?: Locale): boolean => {
        const i18n = this.$i18n
        return i18n._te(key, i18n.locale, i18n._getMessages(), locale)
      }
    }
  })
  // $FlowFixMe
  Object.defineProperty(Vue.prototype, '$d', {
    get () {
      return (value: number | Date, ...args: any): DateTimeFormatResult => {
        return this.$i18n.d(value, ...args)
      }
    }
  })
  // $FlowFixMe
  Object.defineProperty(Vue.prototype, '$n', {
    get () {
      return (value: number, ...args: any): NumberFormatResult => {
        return this.$i18n.n(value, ...args)
      }
    }
  })
}