I18n

Configuration

Edit package

Below is the default configuration for the I18n package:

{
  i18n: {
    src: "dist/site",
    dest: "dist/translated_site",

    default_language: "en",
    locale_src: "i18n/locales",
    generated_locale_dest: "i18n",

		source_version: 2,
		source_delimeter: "\t",

    legacy_path: "_locales"
  },
  serve: {
    port: 8000,
    open: true
  }
};

Custom Configuration

You can override these defaults by passing in options in your Gulpfile:

/* gulpfile.js */
suite.i18n(gulp, {
    "i18n": {
        "default_language": "fr"
    }
});

Available configuration options are as follows:

Key Use
i18n.src Sets the input folder for i18n. This should contain a static site, with tagged content.
i18n.dest Sets the output folder for i18n build (destination for the translated site).
i18n.default_language Sets the default language for the site (i.e. the language of source.json).
i18n.locale_src Sets the folder to read the translated json files for i18n:translate.
i18n.generated_locale_dest Sets the folder to output the source json file from i18n:generate.
i18n.legacy_path Sets the folder to transfer legacy locale files with i18n:legacy-transfer.
i18n.source_version What version should be expected and generated for i18n/source.json.
i18n.source_delimeter What character should be used to format the json in i18n:generate.
serve.port Specifies the port to serve the built site from.
help

Help

Introduction

Go back to Help
arrow_forward

I18n

Introduction

Read next doc