Documentation

 

Sections

A section defines a translation file. The following JSON object is an example section:

{
  name: 'autumn',
  alias: 'fall',
  path: '/assets/i18n/en/autumn.json',
  format: 'JSON',
  type: 'json'
}

The section has these properties:

name: string
The name of the translation file without its file extension.
alias: string
An optional value to use in the translation keys. The default value equals to the name. It can be useful when the file name is too long, or the file was renamed.
path: string
An optional path of the translation file when it does not match the default template.
format: string
An optional value that defines the translation format. It is used for custom format converters.
type: LoaderType
The type of the returned result expected by the downloader. The possible values are: 'json', 'text', 'blob' and 'arraybuffer'. The default value is 'json'. This parameter also is used for custom format converters.

If a section uses the default values, it is rather simple:

{ name: 'autumn' }

The above simple definition can be replaced by the name string:

'autumn'