Skip to content

Create an I18N class #37

@idangoldman

Description

@idangoldman
// autoload locale files from locales folder, support for JSON and YAML.
// based on https://github.com/fnando/i18n
export default class I18N {
	static defaultLocale = ''
	static locales = []
	static fallbackLocales = []
	static missingLocale = ['fallback', 'warning', 'error']

  locale = ''
	isLocale(name = '') {}
	isLocaleExist(name = '') {}

  static translate(name = ''|[], options = {}) {}
  static t(name = '', options = {}) {
	  return this.translate(name, options)
  }
  static plural(name = ''|[], options = {}) {}

  static localize(name = ''|[], options = {}) {}
  static l(name = '', options = {}) {
	  return this.translate(name, options)
  }
i18n.numberToHumanSize(123)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions